Skip to content

Adds variables arg to GraphQLTestCase.query #699

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

Merged
merged 2 commits into from Sep 7, 2019
Merged

Adds variables arg to GraphQLTestCase.query #699

merged 2 commits into from Sep 7, 2019

Conversation

tlambert03
Copy link
Contributor

I was looking for a way to test queries with variables, and formatting the query string directly was a little messy, and I didn't need anything as complex as a custom input_type. If you would prefer I accomplish this by subclassing GraphQLTestCase, I understand... but here's a PR just in case you find it useful. Also added an example to the docs.

Copy link
Member

@jkimbo jkimbo left a comment

Choose a reason for hiding this comment

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

This looks like a great addition thanks @tlambert03 ! Added some comments that should be addressed before merging.

Copy link
Member

@jkimbo jkimbo left a comment

Choose a reason for hiding this comment

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

Looks good thanks @tlambert03

@McPo
Copy link

McPo commented Sep 5, 2019

Would be good to get this merged in. Seems odd that input_type is an arg but variables isn't.

@mvanlonden mvanlonden merged commit 254e59c into graphql-python:master Sep 7, 2019
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.

4 participants