diff --git a/src/utilities/__tests__/buildClientSchema-test.js b/src/utilities/__tests__/buildClientSchema-test.js index 9a0e83de26..738659143e 100644 --- a/src/utilities/__tests__/buildClientSchema-test.js +++ b/src/utilities/__tests__/buildClientSchema-test.js @@ -31,15 +31,10 @@ import { introspectionFromSchema } from '../introspectionFromSchema'; * returns that schema printed as SDL. */ function cycleIntrospection(sdlString: string): string { - const options = { - specifiedByUrl: true, - directiveIsRepeatable: true, - }; - const serverSchema = buildSchema(sdlString); - const initialIntrospection = introspectionFromSchema(serverSchema, options); + const initialIntrospection = introspectionFromSchema(serverSchema); const clientSchema = buildClientSchema(initialIntrospection); - const secondIntrospection = introspectionFromSchema(clientSchema, options); + const secondIntrospection = introspectionFromSchema(clientSchema); /** * If the client then runs the introspection query against the client-side diff --git a/src/utilities/__tests__/introspectionFromSchema-test.js b/src/utilities/__tests__/introspectionFromSchema-test.js index 2aacbfce2b..4afbbeb855 100644 --- a/src/utilities/__tests__/introspectionFromSchema-test.js +++ b/src/utilities/__tests__/introspectionFromSchema-test.js @@ -18,6 +18,7 @@ function introspectionToSDL(introspection: IntrospectionQuery): string { describe('introspectionFromSchema', () => { const schema = new GraphQLSchema({ + description: 'This is a simple schema', query: new GraphQLObjectType({ name: 'Simple', description: 'This is a simple type', @@ -34,6 +35,7 @@ describe('introspectionFromSchema', () => { const introspection = introspectionFromSchema(schema); expect(introspectionToSDL(introspection)).to.deep.equal(dedent` + """This is a simple schema""" schema { query: Simple } diff --git a/src/utilities/introspectionFromSchema.js b/src/utilities/introspectionFromSchema.js index e880b82995..74c90ef38e 100644 --- a/src/utilities/introspectionFromSchema.js +++ b/src/utilities/introspectionFromSchema.js @@ -26,6 +26,7 @@ export function introspectionFromSchema( options?: IntrospectionOptions, ): IntrospectionQuery { const optionsWithDefaults = { + specifiedByUrl: true, directiveIsRepeatable: true, schemaDescription: true, ...options,