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

Adds GraphQL request handlers #45

Merged
merged 14 commits into from
Mar 9, 2020
Merged

Adds GraphQL request handlers #45

merged 14 commits into from
Mar 9, 2020

Conversation

kettanaito
Copy link
Member

@kettanaito kettanaito commented Mar 2, 2020

Roadmap

  • Add the graphql request handlers to the standard request handlers
  • Add the graphql.query() request handler
  • Expose req.variables to the response resolver
  • Set req.variables to an empty object, if no variables are set
  • Make context utilities request handler-specific
  • Add ctx.errors() utility for mocking GraphQL errors
  • Add the graphql.mutation() request handler
  • Support RegExp as selector.operation to handle multiple GraphQL operations matching the expression
  • Parse the query to determine operation name (don't rely on Apollo, not everybody uses it)
  • Add integration tests
    • Query
    • Mutation
    • Variables
    • Errors

@kettanaito kettanaito force-pushed the graphql-handlers branch 7 times, most recently from 7605753 to c605a3b Compare March 4, 2020 13:05
@kettanaito
Copy link
Member Author

GraphQL subscriptions will be introduced later, when the necessary research is done on the topic. Query and mutation handling is a meaningful functionality for a developer.

@kettanaito kettanaito force-pushed the graphql-handlers branch 4 times, most recently from 76f06b4 to 1415a47 Compare March 9, 2020 20:17
@kettanaito kettanaito merged commit 680c53a into master Mar 9, 2020
@kettanaito kettanaito deleted the graphql-handlers branch March 9, 2020 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support mocking GraphQL API
1 participant