Skip to content

Commit

Permalink
Merge pull request #9976 from 5-stones/fix/ra-data-graphql-context
Browse files Browse the repository at this point in the history
fix(ra-data-graphql): fix an issue with custom context being overwritten on queries
  • Loading branch information
djhi authored Jul 10, 2024
2 parents 418ab7d + cb8f264 commit 2353341
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/ra-data-graphql/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,16 @@ const buildGraphQLProvider = (options: Options): DataProvider => {
...query,
fetchPolicy: 'network-only',
...getOptions(otherOptions.query, raFetchMethod, resource),
context: {
};

apolloQuery.context = merge(
{
fetchOptions: {
signal: params?.signal,
},
},
};
apolloQuery.context
);

return (
client
Expand Down

0 comments on commit 2353341

Please sign in to comment.