graphql-coverage
graphql-coverage copied to clipboard
Support for testing multiple graphql schemas
Hi @pocke
I just found this gem and thinks it's very interesting. My application has two graphql schemas: one for our public api and one for our admin-only application. I tried
GraphQL::Coverage.enable(PublicSchema)
GraphQL::Coverage.enable(AdminSchema)
but that fails with
An error occurred in a `before(:suite)` hook.
Failure/Error: GraphQL::Coverage.enable(AdminSchema)
GraphQL::Coverage::Errors::SchemaMismatch:
Schema mismatch: expected PublicSchema, got AdminSchema
# ./spec/rails_helper.rb:149:in `block (2 levels) in <top (required)>'
Finished in 0.01807 seconds (files took 5.52 seconds to load)
0 examples, 0 failures, 1 error occurred outside of examples
(the line reference in the error above is GraphQL::Coverage.enable(AdminSchema)
Would it be possible to support testing multiple schemas? Can you see any workarounds?