Skip to content

Conversation

Tabby
Copy link

@Tabby Tabby commented Feb 21, 2025

If passing a path to a file with a name that ends in ".graphql" or ".graphqls" (matching the filenames used in
graphql-ruby), attempt to load the schema from that file assuming it's a schema definition rather than a JSON schema.

@jesstice
Copy link

Is there anything that can be done to help move this PR along? 🙏 This is something our team would benefit from as we have introspection disabled for our graphql server.

@Tabby
Copy link
Author

Tabby commented Sep 19, 2025

Is there anything that can be done to help move this PR along? 🙏 This is something our team would benefit from as we have introspection disabled for our graphql server.

Knowing it would be helpful for someone else is a pretty good incentive to make time to finish it :)
Tests all pass locally now, and it tests loading a GraphQL schema SDL from both a string and from a file

➜  graphql-client git:(allow-loading-schema-from-sdl-definition) rake test
Run options: --seed 26501

# Running:

........S..SS..............................................................................................................S..............................................

Finished in 1.468751s, 115.7446 runs/s, 437.1061 assertions/s.

170 runs, 642 assertions, 0 failures, 0 errors, 4 skips

You have skipped tests. Run with --verbose for details.

If passing a path to a file with a name that ends in ".graphql" or
".graphqls" (matching the filenames used in
[graphql-ruby](https://github.com/rmosolgo/graphql-ruby/blob/master/lib/graphql/schema.rb#L116)),
attempt to load the schema from that file assuming it's a schema
definition rather than a JSON schema.
@Tabby Tabby force-pushed the allow-loading-schema-from-sdl-definition branch from c9755e5 to e474f12 Compare September 19, 2025 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants