Skip to content

Conversation

IvanGoncharov
Copy link
Member

No description provided.

@IvanGoncharov IvanGoncharov added this to the v14.0.0 milestone Aug 6, 2018
new GraphQLError(schemaDefinitionNotAloneMessage(), node),
);
}
++schemaDefinitionsCount;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now it generates separate errors on every duplicated schema definition.
It makes the order of errors to match the order of definitions in SDL.
Based on very similar code here:

if (!node.name && operationCount > 1) {
context.reportError(
new GraphQLError(anonOperationNotAloneMessage(), [node]),
);
}

Copy link
Contributor

@mjmahone mjmahone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making this improvement

@IvanGoncharov IvanGoncharov merged commit 3217802 into graphql:master Aug 7, 2018
@IvanGoncharov IvanGoncharov deleted the LoneSchemaTests branch August 8, 2018 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants