type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
ArrowFunction
() => { return new Observable(observer => { observer.next({ data, errors }); }); }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
observer => { observer.next({ data, errors }); }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(error: ApolloError) => { expect(error.graphQLErrors).toEqual(errors); resolve(); }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(resolve, reject) => { const query = gql` query people { allPeople(first: 1) { people { name } } } `; const networkError = new Error('Some kind of network error.'); const link = ApolloLink.from([ () => { return new Observable(_...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
() => { return new Observable(_ => { throw networkError; }); }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
_ => { throw networkError; }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(error: ApolloError) => { expect(error.networkError).toBeDefined(); expect(error.networkError!.message).toEqual(networkError.message); resolve(); }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
() => { const query = gql` query people { allPeople(first: 1) { people { name } } } `; const data = { allPeople: { people: [ { name: 'Luke Skywalker', }, ], }, }; const link = A...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
() => Observable.of({ data }, { data })
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(result: ExecutionResult) => { expect(result.data).toEqual(data); }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(resolve, reject) => { const expectedError = new Error('this error should not reach the store'); const listeners = process.listeners('uncaughtException'); const oldHandler = listeners[listeners.length - 1]; const handleUncaught = (e: Error) => { console.log(e); process.removeListener('uncau...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(e: Error) => { console.log(e); process.removeListener('uncaughtException', handleUncaught); if (typeof oldHandler === 'function') process.addListener('uncaughtException', oldHandler); if (e === expectedError) { resolve(); } else { reject(e); } }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(resolve, reject) => { const expectedError = new Error('this error should not reach the store'); const listeners = process.listeners('uncaughtException'); const oldHandler = listeners[listeners.length - 1]; const handleUncaught = (e: Error) => { process.removeListener('uncaughtException', handleU...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(e: Error) => { process.removeListener('uncaughtException', handleUncaught); process.addListener('uncaughtException', oldHandler); if (e === expectedError) { resolve(); } else { reject(e); } }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(resolve, reject) => { const query = gql` query people { allPeople(first: 1) { people { name } } } `; const data = { allPeople: { people: [ { name: 'Luke Skywalker', }, ], }, }; ...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(resolve, reject) => { const query = gql` query { author { firstName lastName } } `; const transformedQuery = gql` query { author { firstName lastName __typename } } `; const result = { ...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
actualResult => { expect(actualResult.data).toEqual(transformedResult); }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(resolve, reject) => { const query = gql` query { author { firstName lastName } } `; const transformedQuery = gql` query { author { firstName lastName __typename } } `; const result = { a...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
actualResult => { expect(actualResult.data).toEqual(transformedResult); }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(resolve, reject) => { const mutation = gql` mutation { starAuthor(id: 12) { author { __typename ...authorDetails } } } fragment authorDetails on Author { firstName lastName } `; const result = { star...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(resolve, reject) => { const query = gql` fragment authorDetails on Author { firstName lastName } query { author { __typename ...authorDetails } } `; const result = { author: { __typename: 'Author', firstName...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
actualResult => { expect(actualResult.data).toEqual(result); }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(resolve, reject) => { const query = gql` query { author { __typename ...authorDetails ...moreDetails } } fragment authorDetails on Author { firstName lastName } fragment moreDetails on Author { address } ...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(resolve, reject) => { const query = gql` query { author { __typename ...authorDetails } } fragment authorDetails on Author { firstName lastName } `; const result = { author: { __typename: 'Author', firstName...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(resolve, reject) => { const query = gql` query items { items { ...ItemFragment __typename } } fragment ItemFragment on Item { id __typename ... on ColorItem { color __typename } } `; const resu...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(actualResult: any) => { expect(actualResult.data).toEqual(result); }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(resolve, reject) => { const query = gql` query items { items { ...ItemFragment __typename } } fragment ItemFragment on Item { id ... on ColorItem { color __typename } __typename } `; const resu...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(resolve, reject) => { const query = gql` query items { items { ...ItemFragment __typename } } fragment ItemFragment on Item { id ... on ColorItem { color __typename } __typename } `; const resu...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(prev: any) => { queryUpdaterSpy(); return prev; }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
() => { expect(queryUpdaterSpy).toBeCalled(); expect(updateSpy).toBeCalled(); sub.unsubscribe(); resolve(); }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
err => { reject(err); }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
() => { const query = gql` query myQueryName { fortuneCookie } `; const data = { fortuneCookie: 'The waiter spit in your food', }; const link = ApolloLink.from([ request => { expect(request.operationName).toBe('myQueryName'); return Observable.of({ da...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
request => { expect(request.operationName).toBe('myQueryName'); return Observable.of({ data }); }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
actualResult => { expect(actualResult.data).toEqual(data); }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
() => { const mutation = gql` mutation myMutationName { fortuneCookie } `; const data = { fortuneCookie: 'The waiter spit in your food', }; const link = ApolloLink.from([ request => { expect(request.operationName).toBe('myMutationName'); return Observ...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
request => { expect(request.operationName).toBe('myMutationName'); return Observable.of({ data }); }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(resolve, reject) => { const queryDoc = gql` query { author { name } } `; const data = { author: { name: 'Jonas', }, }; const data2 = { author: { name: 'Dhaivat', }, }; // we have two responses for identical quer...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
([result1, result2]) => { expect(result1.data).toEqual(data); expect(result2.data).toEqual(data2); }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(resolve, reject) => { const queryDoc = gql` query { author { name } } `; const data = { author: { name: 'Jonas', }, }; const data2 = { author: { name: 'Dhaivat', }, }; // we have two responses for identical quer...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
([result1, result2]) => { expect(result1.data).toEqual(result2.data); }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
() => { const queryDoc = gql` query { author { name } } `; const data = { author: { name: 'Jonas', }, }; const data2 = { author: { name: 'Dhaivat', }, }; // we have two responses for identical queries, but only t...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
([result1, result2]) => { expect(result1.data).toEqual(data); expect(result2.data).toEqual(data); }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
() => { const queryDoc = gql` query { author { name } } `; const data = { author: { name: 'Jonas', }, }; const data2 = { author: { name: 'Dhaivat', }, }; // we have two responses for identical queries, and both s...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(resolve, reject) => { const document: DocumentNode = gql` query test1($x: String) { test(x: $x) } `; const variables1 = { x: 'Hello World' }; const variables2 = { x: 'Hello World' }; let unsubscribed = false; const client = new ApolloClient({ link: new ApolloLink((...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
() => { return new Observable(observer => { observer.complete(); return () => { unsubscribed = true; setTimeout(resolve, 0); }; }); }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
observer => { observer.complete(); return () => { unsubscribed = true; setTimeout(resolve, 0); }; }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
() => { unsubscribed = true; setTimeout(resolve, 0); }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
() => { const query = gql` query people { name } `; it('errors when returnPartialData is used on query', () => { const client = new ApolloClient({ link: ApolloLink.empty(), cache: new InMemoryCache(), }); expect(() => { client.query({ query, re...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
() => { const client = new ApolloClient({ link: ApolloLink.empty(), cache: new InMemoryCache(), }); expect(() => { client.query({ query, returnPartialData: true } as QueryOptions); }).toThrowError(/returnPartialData/); }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
() => { client.query({ query, returnPartialData: true } as QueryOptions); }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
() => { const query = gql` query people { allPeople(first: 1) { people { id name } } } `; const data = { allPeople: { people: [ { id: '1', name: 'Luke Skywalker', }, ],...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(resolve, reject) => { const link = mockSingleLink({ request: { query }, result: { data }, }).setOnError(reject); const client = new ApolloClient({ link, cache: new InMemoryCache({ dataIdFromObject: (obj: { id: any }) => obj.id, addTypename: false...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(obj: { id: any }) => obj.id
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
result => { expect(result.data).toEqual(data); expect((client.cache as InMemoryCache).extract()['1']).toEqual({ id: '1', name: 'Luke Skywalker', }); }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
() => { const query = gql` query number { myNumber { n } } `; const initialData = { myNumber: { n: 1, }, }; const networkFetch = { myNumber: { n: 2, }, }; const cacheAndNetworkError = 'The cache-and-networ...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
() => { const client = new ApolloClient({ link: ApolloLink.empty(), cache: new InMemoryCache(), }); checkCacheAndNetworkError( () => client.query({ query, fetchPolicy: 'cache-and-network' as FetchPolicy, }), ); }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
() => client.query({ query, fetchPolicy: 'cache-and-network' as FetchPolicy, })
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
() => { const client = new ApolloClient({ link: ApolloLink.empty(), cache: new InMemoryCache(), defaultOptions: { query: { fetchPolicy: 'cache-and-network' as FetchPolicy, }, }, }); checkCacheAndNetworkError(() => client.query({ ...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
() => client.query({ query, // This undefined value should be ignored in favor of // defaultOptions.query.fetchPolicy. fetchPolicy: void 0, })
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(resolve, reject) => { const link = mockSingleLink({ request: { query }, result: { data: networkFetch }, }).setOnError(reject); const client = new ApolloClient({ link, cache: new InMemoryCache({ addTypename: false }), }); client.writeQuery({ query, data: ...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(handleCount, result) => { if (handleCount === 1) { expect(result.data).toEqual(initialData); } else if (handleCount === 2) { expect(result.data).toEqual(networkFetch); resolve(); } }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(resolve, reject) => { const link = mockSingleLink({ request: { query }, result: { data: networkFetch }, }).setOnError(reject); const client = new ApolloClient({ link, cache: new InMemoryCache({ addTypename: false }), }); const obs = client.watchQuery({ ...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(handleCount, result) => { expect(handleCount).toBe(1); expect(result.data).toEqual(networkFetch); expect(result.loading).toBe(false); resolve(); }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(resolve, reject) => { const link = mockSingleLink(); // no queries = no replies. const client = new ApolloClient({ link, cache: new InMemoryCache({ addTypename: false }), }); const obs = client.watchQuery({ query, fetchPolicy: 'cache-and-network', }); ...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
e => { if (!/No more mocked responses/.test(e.message)) { reject(e); } else { resolve(); } }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(resolve, reject) => { const link = mockSingleLink({ request: { query }, result: { errors: [{ message: 'network failure' }] }, }).setOnError(reject); const client = new ApolloClient({ link, cache: new InMemoryCache({ addTypename: false }), }); client.writ...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
rejection => { if (shouldFail) reject('promise had an unhandledRejection'); }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
result => { expect(result.data).toEqual(initialData); expect(result.loading).toBe(true); count++; }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
e => { expect(e.message).toMatch(/network failure/); expect(count).toBe(1); // make sure next was called. setTimeout(() => { shouldFail = false; resolve(); }, 0); }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
() => { shouldFail = false; resolve(); }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
() => { itAsync('are not watching the store or notifying on updates', (resolve, reject) => { const query = gql` { test } `; const data = { test: 'ok' }; const data2 = { test: 'not ok' }; const link = mockSingleLink({ request: { query }, resul...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(resolve, reject) => { const query = gql` { test } `; const data = { test: 'ok' }; const data2 = { test: 'not ok' }; const link = mockSingleLink({ request: { query }, result: { data }, }).setOnError(reject); const client = new Apollo...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(handleCount, result) => { if (handleCount === 1) { expect(result.data).toEqual(data); obs.setOptions({ query, fetchPolicy: 'standby' }).then(() => { client.writeQuery({ query, data: data2 }); // this write should be completely ignored by the standby query ...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
() => { client.writeQuery({ query, data: data2 }); // this write should be completely ignored by the standby query }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
() => { if (!handleCalled) { resolve(); } }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(resolve, reject) => { const query = gql` { test } `; const data = { test: 'ok' }; const data2 = { test: 'not ok' }; const link = mockSingleLink({ request: { query }, result: { data }, }).setOnError(reject); const client = new Apollo...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(handleCount, result) => { if (handleCount === 1) { expect(result.data).toEqual(data); obs.setOptions({ query, fetchPolicy: 'standby' }).then(() => { client.writeQuery({ query, data: data2 }); // this write should be completely ignored by the standby query ...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
() => { client.writeQuery({ query, data: data2 }); // this write should be completely ignored by the standby query setTimeout(() => { obs.setOptions({ query, fetchPolicy: 'cache-first' }); }, 10); }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
() => { obs.setOptions({ query, fetchPolicy: 'cache-first' }); }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
() => { const query = gql` query number { myNumber { n } } `; const firstFetch = { myNumber: { n: 1, }, }; const secondFetch = { myNumber: { n: 2, }, }; function makeLink(reject: (reason: any) => any) { re...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(resolve, reject) => { const client = new ApolloClient({ link: makeLink(reject), cache: new InMemoryCache({ addTypename: false }), }); // Run a query first to initialize the store return client .query({ query }) // then query for real .then(() => client....
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
() => client.query({ query, fetchPolicy: 'network-only' })
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
result => { expect(result.data).toEqual({ myNumber: { n: 2 } }); }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(resolve, reject) => { const client = new ApolloClient({ link: makeLink(reject), ssrMode: true, cache: new InMemoryCache({ addTypename: false }), }); const options: QueryOptions = { query, fetchPolicy: 'network-only' }; // Run a query first to initialize the store ...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
() => client.query(options)
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
result => { expect(result.data).toEqual({ myNumber: { n: 1 } }); // Test that options weren't mutated, issue #339 expect(options).toEqual({ query, fetchPolicy: 'network-only', }); }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(resolve, reject) => { const client = new ApolloClient({ link: makeLink(reject), ssrForceFetchDelay: 100, cache: new InMemoryCache({ addTypename: false }), }); // Run a query first to initialize the store return client .query({ query }) // then query for...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
() => { return client.query({ query, fetchPolicy: 'network-only' }); }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
async result => { expect(result.data).toEqual({ myNumber: { n: 1 } }); await new Promise(resolve => setTimeout(resolve, 100)); return client.query({ query, fetchPolicy: 'network-only' }); }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(resolve, reject) => { const mutation = gql` mutation { person { firstName lastName } } `; const data = { person: { firstName: 'John', lastName: 'Smith', }, }; const networkError = new Error('Some kind of network error.'); ...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
_ => { reject(new Error('Returned a result when it should not have.')); }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(error: ApolloError) => { expect(error.networkError).toBeDefined(); expect(error.networkError!.message).toBe(networkError.message); resolve(); }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(resolve, reject) => { const mutation = gql` mutation { newPerson { person { firstName lastName } } } `; const data = { person: { firstName: 'John', lastName: 'Smith', }, }; const errors = [new Error...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(error: ApolloError) => { expect(error.graphQLErrors).toBeDefined(); expect(error.graphQLErrors.length).toBe(1); expect(error.graphQLErrors[0].message).toBe(errors[0].message); resolve(); }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(resolve, reject) => { const mutation = gql` mutation { newPerson { person { firstName lastName } } } `; const data = { person: { firstName: 'John', lastName: 'Smith', }, }; const errors = [new Error...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
result => { expect(result.errors).toBeDefined(); expect(result.errors!.length).toBe(1); expect(result.errors![0].message).toBe(errors[0].message); expect(result.data).toEqual({ newPerson: data, }); resolve(); }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(error: ApolloError) => { throw error; }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(resolve, reject) => { const mutation = gql` mutation { newPerson { person { firstName lastName } } } `; const data = { newPerson: { person: { firstName: 'John', lastName: 'Smith', }, }, ...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
result => { expect(result.errors).toBeUndefined(); expect(result.data).toEqual(data); resolve(); }
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript
ArrowFunction
(resolve, reject) => { const mutation = gql` mutation { newPerson { person { firstName lastName } } } `; const data = { newPerson: { person: { firstName: 'John', lastName: 'Smith', }, }, ...
AaronSuAu/apollo-client
src/__tests__/client.ts
TypeScript