Graphql requests returning "bad request" without details

Hi, I have been using Prismic for a while and in the last few days my requests are returning "404 Bad Request" without any changes in the request sent. The feature is managed by my communication team so I don't know if it was caused by any change in the content but I think that it could be a bug.

curl
curl --location -g --request GET 'https://entrepreneur-announcements.prismic.io/graphql?query=query entrepreneur_announcements($banner_uid: String!, $dialog_uid: String!, $lang: String!){ banner(uid: $banner_uid, lang: $lang) { active url { _linkType __typename ... on _ExternalLink{ url } ... on _FileLink{ name url size } } active_for backgroundimage title content frequency } dialog(uid: $dialog_uid, lang: $lang) { active url { _linkType __typename ... on _ExternalLink{ url } ... on _FileLink{ name url size } } active_for image frequency } }&variables={"banner_uid":"announcements_banner_v1","dialog_uid":"announcements_dialog_v1","lang":"pt-br"}'
--header 'Prismic-Ref: YFUZQBAAACAADPDF'

edit: Tests using the same query on the GraphQL Explorer returns all items with success :frowning:

Hi Bia,

Welcome to the Prismic comunnity,
From a first look it seems that it is an issue in the request you are doing because if your query works from the GraphQL browser.

I will try to produce the error in Curl and get back to you.

Best,
Fares

1 Like

FYI I've tried to reproduce in Postman but I get this error.
Screenshot 2021-03-22 at 15.20.04

Can you please provide a direct link to the query that is working in GraphQL browser? I've tested the query that you have used in curl and ti gives an error.

Helo Fares, thank you for the answer. Here is the direct link that you requested

https://entrepreneur-announcements.prismic.io/graphql?operationName=entrepreneur_announcements&query=query%20entrepreneur_announcements(%24banner_uid%3A%20String!%2C%20%24dialog_uid%3A%20String!%2C%20%24lang%3A%20String!){ %20%20%20%20banner(uid%3A%20%24banner_uid%2C%20lang%3A%20%24lang)%20{ %20%20%20%20%20%20active %20%20%20%20%20%20url%20{ %20%20%20%20%20%20%20%20%20%20_linkType %20%20%20%20%20%20%20%20%20%20__typename %20%20%20%20%20%20%20%20%20%20...%20on%20_ExternalLink{ %20%20%20%20%20%20%20%20%20%20%20%20url %20%20%20%20%20%20%20%20%20%20} %20%20%20%20%20%20%20%20%20%20...%20on%20_FileLink{ %20%20%20%20%20%20%20%20%20%20%20%20name %20%20%20%20%20%20%20%20%20%20%20%20url %20%20%20%20%20%20%20%20%20%20%20%20size %20%20%20%20%20%20%20%20%20%20} %20%20%20%20%20%20%20%20} %20%20%20%20%20%20active_for %20%20%20%20%20%20backgroundimage %20%20%20%20%20%20title %20%20%20%20%20%20content %20%20%20%20%20%20frequency %20%20%20%20} %20%20%20%20dialog(uid%3A%20%24dialog_uid%2C%20lang%3A%20%24lang)%20{ %20%20%20%20%20%20active %20%20%20%20%20%20url%20{ %20%20%20%20%20%20%20%20%20%20_linkType %20%20%20%20%20%20%20%20%20%20__typename %20%20%20%20%20%20%20%20%20%20...%20on%20_ExternalLink{ %20%20%20%20%20%20%20%20%20%20%20%20url %20%20%20%20%20%20%20%20%20%20} %20%20%20%20%20%20%20%20%20%20...%20on%20_FileLink{ %20%20%20%20%20%20%20%20%20%20%20%20name %20%20%20%20%20%20%20%20%20%20%20%20url %20%20%20%20%20%20%20%20%20%20%20%20size %20%20%20%20%20%20%20%20%20%20} %20%20%20%20%20%20%20%20} %20%20%20%20%20%20active_for %20%20%20%20%20%20image %20%20%20%20%20%20frequency %20%20%20%20} %20%20}&variables={"banner_uid"%3A"announcements_banner_v1"%2C"dialog_uid"%3A"announcements_dialog_v1"%2C"lang"%3A"pt-br"}

I haven't been able to reproduce this issue on my end, but may I know the technology and stack you use with GraphQL?

Note: for me, it seems it is an issue related to the way you build your Curl command because if the GraphQL browser call works, then calling it from your application should because the request behind the scene for both is the same.

This issue has been closed due to inactivity. Flag to reopen.