-
Notifications
You must be signed in to change notification settings - Fork 67
Improve the Schema Generation with Ordering the Types #2438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Are there any updates I should make |
Assert.assertTrue(sdlSchema.contains("type Query"), "Schema should contain Query type"); | ||
Assert.assertTrue(sdlSchema.contains("hello"), "Query should have hello field"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this test is not testing the exact functionality. Shall we add an end-to-end test where we generate the schema and then compare an existing schema defined using GraphQL SDL?
I think the schema generation tests are done inside the graphql-tools repository since the GraphQL tool is the place where we generate the tests. Can you please check that too? You can publish this to your local maven repository and use the SNAPSHOT version in the graphql tools to see the failing tests (this change must fail some tests there). Please let us know if you face any issues while doing this, can help you out.
@DimuthuMadushan am I missing anything here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you’ve covered everything. With this change, the SDL schema generation test needs to be updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to see that you have added some tests here!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
diff.patch
Here is a patch file showing it working in graphql tools
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There are some compilation errors, @sccalabr can you please check? |
|
Purpose
Fixes: ballerina-platform/ballerina-library#6441
Examples
Checklist
commons
package changes (if there are any, please update the GraphQL version in GraphQL tools and Ballerina dev tools)compiler
package changes (if there are any, please update the GraphQL version in Ballerina dev tools)