Skip to content
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

Fix graphql deprecation warnings #1056

Closed

Conversation

graingert
Copy link
Member

No description provided.

@@ -123,19 +123,19 @@ async def execute( # type: ignore
if self.is_async:
return await self.schema.execute(
query,
variables=variables,
variable_values=variables,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you might instead choose to propagate the rename all the way up?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 I'm in two minds about this. On the one hand, graphene/graphql-core seems to have settled on these names with _value. OTOH, whether we want to properly support GraphQL in Starlette is unclear (#619) so I'm hesitant to make more than the most minimal changes to make the warnings go away.

How about we do go to the effort of renaming the parameters of this function (execute(..., variable_values=None, ...) so that it remains a very small wrapper around calling the schema? But not do anything more than that (although that might be everything there is to do anyway 😅). It doesn't seem to be a documented Starlette API anyway, so it should be safe to change.

Copy link
Member

@JayH5 JayH5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for following up on this.

@@ -123,19 +123,19 @@ async def execute( # type: ignore
if self.is_async:
return await self.schema.execute(
query,
variables=variables,
variable_values=variables,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 I'm in two minds about this. On the one hand, graphene/graphql-core seems to have settled on these names with _value. OTOH, whether we want to properly support GraphQL in Starlette is unclear (#619) so I'm hesitant to make more than the most minimal changes to make the warnings go away.

How about we do go to the effort of renaming the parameters of this function (execute(..., variable_values=None, ...) so that it remains a very small wrapper around calling the schema? But not do anything more than that (although that might be everything there is to do anyway 😅). It doesn't seem to be a documented Starlette API anyway, so it should be safe to change.

@JayH5 JayH5 added the graphql label Feb 4, 2021
@JayH5
Copy link
Member

JayH5 commented Feb 5, 2021

Thank you for creating this pull request. We have decided to deprecate GraphQL support within Starlette itself so I am going to close this pull request. See #619.

@JayH5 JayH5 closed this Feb 5, 2021
@graingert graingert deleted the fix-graphql-deprecation-warnings branch February 5, 2021 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants