graphql-python / graphql-server

This is the core package for using GraphQL in a custom server easily
MIT License
120 stars 72 forks source link

RFC: Inherit Execute Options for GraphQLView Methods #78

Open KingDarBoja opened 3 years ago

KingDarBoja commented 3 years ago

Related to #77.

Currently the execute() method from graphql-core provides several keyword arguments to be passed on, which aren't included at all on such GraphQLView class methods. These can be passed using the **kwargs syntax but should be great to infer from execute() the available options.

So far this is being discussed at PEP-0612 and the tracking issue as this use case was discussed at this typing repository issue.

The only workaround is to manually specify the same types in order to provide each integration with the same capabilities from graphql-core out of the box.

cc @Cito

kiendang commented 1 year ago

After spending time reading the specs, I don't think PEP 612's gonna help with this use case at all. The ParametersOf and ReturnType operators, which were listed under "Rejected Alternatives", would actually help, which is unfortunate. Guess we'd still have to manually specify the same types for each framework integration.