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

Playground endpoint is not dynamic #1003

Open
astghikxachatryan opened this issue Jun 26, 2023 · 2 comments
Open

Playground endpoint is not dynamic #1003

astghikxachatryan opened this issue Jun 26, 2023 · 2 comments

Comments

@astghikxachatryan
Copy link

astghikxachatryan commented Jun 26, 2023

const url = ${window.location.protocol}//${host}${window.GRAPHQL_ENDPOINT}``

Playground doesn't work on URLs like this https://foo.com/comments/graphiql.
https://foo.com/comments/ is the API getaway URL that routes to our comments service and comments service is based on Mercurius.
In this case code just ignores the part after host(in my case comments)

And playground calls to wrong qraphql url. It calls https://foo.com/graphql instead of https://foo.com/comments/graphql

@mcollina
Copy link
Collaborator

Thanks for reporting! Would you like to send a Pull Request to address this issue? Remember to add unit tests.

@glg-satish-tripathi
Copy link
Contributor

@mcollina we are deploying graphql api and using this package and we are also facing the same issue. I have created the fix . Please review and approve it.

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

No branches or pull requests

3 participants