Dump graphql schema for reference

This commit is contained in:
Paul Chavard 2018-11-20 22:21:38 +01:00
parent ba683a107c
commit 5a7eb734ff
2 changed files with 262 additions and 0 deletions

View 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