Skip to content

typesafe stubbing of graphQL requests for integration tests

Administrator requested to merge twop/gql-operations-extraction into master

Created by: twop

done:

  • wrote a script that extracts all gql operations into a separate typescript file that has an interface that describes all operations as functions with input and output
  • made all graphlql operations having unique names
  • add npm script to generate these interfaces for web and shared (one per tsconfig.json). For now it needs to be run manually.
  • fixed an error that was in ts-graphql-plugin related to nested list syntax [[Int!]!]
  • made overrideGraphQL calls and waitForGraphQLRequest fully typesafe and now it supports autocomplete
  • refactored our existing tests accordingly
image image image

Merge request reports

Loading