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

Validate Typed operations and subqueries #500

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

armanbilge
Copy link
Contributor

GraphQLOperation.Typed and GraphQLSubquery.Typed are now pre-processed through the same codegen pipeline as their non-Typed counterparts and thus fully validated against the schema. However no modifications are applied in this case, since everything is already defined on the Typed superclass.

@mergify mergify bot added the rules label Apr 26, 2023
@rpiaggio
Copy link
Collaborator

Thank you for implementing this, looks awesome! Just a couple of comments:

  • A query of subquery may have everything defined but not extend .Typed. Should we handle these cases?
  • Is it worthwhile to add an intentionally failing test?

@armanbilge
Copy link
Contributor Author

  • A query of subquery may have everything defined but not extend .Typed. Should we handle these cases?

Oh right, I see what you mean. So we offer a general validator, independently of whether code-generation is performed or not. That seems like a good idea.

  • Is it worthwhile to add an intentionally failing test?

Yeah, seems like a good idea :) at the moment we only know it exercises the codepath because the annotation is removed. I'll check how to do this with scalafix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants