GraphQL query returns 404 from postman

Hello,

I am new to using graphql in Squidex and while I am able to run the queries in the app(cms), I am getting 404 responses when I try doing postman requests. Below is the endpoint schema i am using.

https://{domain}/app/{app-name}/api/graphql

I am not sure if this is the correct endpoint as it is the one I got from the cms graphql page.

It is the same endpoint that is also used in the UI.

Are you authenticating yourself with an api key?

Ideally it would be the same one I would be using in the ui. I am using the auth credentials that I use for the rest api.

that should work, I don’t know why you retrieve a 404.

Found out what the issue is i was using wrong url. For graph calls i need to use /api/content/ not just /api/ https://{domain}/api/content/{app-name}/graphql

1 Like

Same here I too didnt easily find the end graphql url on the cloud squidex interface until I reached the support forum.

https://cloud.squidex.io/api/content/{app-name}/graphql (Is the GraphQL API endpoint for hitting API Requests)

Here the response is json as in your editor

Vs

https://cloud.squidex.io/app/{app-name}/api/graphql (App Url is for GraphQL PLAYGROUND i.e the GraphiQL Editor in your browser to manually try the queries)

Here the response is an html file

Suggestion for Ease of Use to other new Developers
@Sebastian I guess there is some scope to include it in the live documentation that

https://cloud.squidex.io/api/content/{app-name}/graphql (GRAPHQL endpoint for CMS)

format is used for GraphQL endpoint

and not the UI one

i.e https://cloud.squidex.io/app/{app-name}/api/graphql

2 Likes