Dump graphql schema for reference
This commit is contained in:
parent
ba683a107c
commit
5a7eb734ff
2 changed files with 262 additions and 0 deletions
11
spec/lib/tasks/graphql_spec.rb
Normal file
11
spec/lib/tasks/graphql_spec.rb
Normal file
|
@ -0,0 +1,11 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe 'graphql' do
|
||||
let(:current_defn) { Api::V2::Schema.to_definition }
|
||||
let(:printout_defn) { File.read(Rails.root.join('app', 'graphql', 'schema.graphql')) }
|
||||
|
||||
it "update the printed schema with `bin/rake graphql:schema:idl`" do
|
||||
result = GraphQL::SchemaComparator.compare(current_defn, printout_defn)
|
||||
expect(result.identical?).to be_truthy
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue