Skip to content

Commit

Permalink
Pass named options to graphql function.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
benjamn committed Nov 22, 2021
1 parent 145efb2 commit 19f6e42
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/index.jsx
Expand Up @@ -65,14 +65,12 @@ const link = new ApolloLink(operation => {
const { query, operationName, variables } = operation;
await delay(300);
try {
const result = await graphql(
const result = await graphql({
schema,
print(query),
null,
null,
variables,
source: print(query),
variableValues: variables,
operationName,
);
});
observer.next(result);
observer.complete();
} catch (err) {
Expand Down

0 comments on commit 19f6e42

Please sign in to comment.