Skip to content

Commit 19f6e42

Browse files
committed
Pass named options to graphql function.
Similar to changes made by @brainkim in apollographql/apollo-client#8997, this commit fixes the React Apollo template application when built with graphql@16, since support for passing positional arguments was removed in graphql/graphql-js#2904.
1 parent 145efb2 commit 19f6e42

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/index.jsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,12 @@ const link = new ApolloLink(operation => {
6565
const { query, operationName, variables } = operation;
6666
await delay(300);
6767
try {
68-
const result = await graphql(
68+
const result = await graphql({
6969
schema,
70-
print(query),
71-
null,
72-
null,
73-
variables,
70+
source: print(query),
71+
variableValues: variables,
7472
operationName,
75-
);
73+
});
7674
observer.next(result);
7775
observer.complete();
7876
} catch (err) {

0 commit comments

Comments
 (0)