-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Describe the bug
GraphQL queries that reference fragments defined after their usage silently fail. The UI shows "Loading... Waiting for valid schema and query..." instead of displaying a proper validation error.
To Reproduce
Steps to reproduce the behavior:
- Go to 'https://schwer.github.io/graphql-to-openapi/'
- Paste a GraphQL query that uses a fragment before it is defined (e.g., use
...MyFragment
at the top and definefragment MyFragment on ...
below) - See the message "Loading... Waiting for valid schema and query..."
- Reorder the fragment definition above its usage and see that the issue resolves
Expected behavior
A clear validation error should be shown if fragment order is required, or the tool should support unordered fragment definitions according to the GraphQL spec.
Screenshots
Not applicable — only the generic "Loading..." message is shown.
Desktop (please complete the following information):
- OS: macOS Ventura 13.4
- Browser: Chrome
- Version: 125.0.6422.113
Smartphone (please complete the following information):
- Device: N/A
- OS: N/A
- Browser: N/A
- Version: N/A
Additional context
The current behavior makes it difficult to debug invalid queries. A proper error message would significantly improve the developer experience.