Skip to content
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

Use index.php?graphql for GraphQL endpoint #1360

Closed
justlevine opened this issue Mar 29, 2023 · 2 comments
Closed

Use index.php?graphql for GraphQL endpoint #1360

justlevine opened this issue Mar 29, 2023 · 2 comments
Labels
package: @faustwp/cli The issue relates to CLI package package: @faustwp/core Related to the Faust Core package

Comments

@justlevine
Copy link
Contributor

In order to support custom graphql endpoints (and maybe sites without pretty permalinks) we should use the underlying WP query to get the GraphQL endpoint in generatePossibleTypes and getGraphqlEndpoint (i.e /index.php?graphql instead of /graphql).

While this is technically filterable in the app itself with graphqlEndpoint, that filter has no effect on type generation. Also, this approach negates the need for a filter entirely (unless maybe you're mocking endpoint data? is that a thing in the frontend ecosystem?).

@josephfusco josephfusco added package: @faustwp/core Related to the Faust Core package package: @faustwp/cli The issue relates to CLI package labels Mar 30, 2023
@josephfusco
Copy link
Member

josephfusco commented Mar 30, 2023

Thanks for bringing this up!

We have partial support for this right now via https://faustjs.org/docs/plugin-system/filters#graphqlendpoint however that filter is currently only supported by the @faustwp/core package.

Note that this approach could also be used within #1318 to improve the WPGraphQL health check.

@josephfusco
Copy link
Member

Closed by #1318. Thanks @justlevine!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: @faustwp/cli The issue relates to CLI package package: @faustwp/core Related to the Faust Core package
Projects
None yet
Development

No branches or pull requests

2 participants