-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
formatParams replacement and GraphQLExtension #1404
Comments
The reason we removed To make sure that covers your use case, do I get it right you want to modify variables for an incoming GraphQL request? |
Ah, ok so it probably doesn't make sense to document it for now then. |
No solution yet? My entire app can't work without this |
Hey @richgilbank @terion-name this is something that can be done using the new request pipeline that is supported now and will be getting a lot more support (and docs) in the future! |
Hi folks!
It looks like the removal of
formatParams
from the ApolloServer constructor options eliminates the approach some have taken to omit__typename
from mutations derived from query results.See here: apollographql/apollo-client#1564
This may be a bit of an edge case, but there seems to be a number of issues relating to the following situation:
__typename
is added to the query result]__typename
not being defined in the typedefs.One workaround to this has historically been using
formatParams
to omit the __typename key from any incoming variables, so it doesn't have to happen on the client side (and consequently doesn't have to be implemented in every consumer).@evans mentioned "The experimental, non-public
graphql-extensions
provides a more structured and flexible way of instrumenting Apollo Server", though I haven't seen any implementations or docs that might help to do so.So, I suppose any of the following would really help to clarify usage with the new approach:
graphql-extensions
graphql-extensions
Or is it a short-term workaround that shouldn't be documented yet?
Thanks!
The text was updated successfully, but these errors were encountered: