Skip to content

Commit

Permalink
fix(ra-data-graphql): fix an issue with custom context being overwrit…
Browse files Browse the repository at this point in the history
…ten on queries

fix marmelab#9973
  • Loading branch information
jspizziri committed Jul 5, 2024
1 parent dbafb81 commit ba8a537
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 ba8a537

Please sign in to comment.