Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Using Upload extension causes errors #1292

Closed
scythewyvern opened this issue Dec 24, 2024 · 3 comments · Fixed by #1293
Closed

Using Upload extension causes errors #1292

scythewyvern opened this issue Dec 24, 2024 · 3 comments · Fixed by #1293

Comments

@scythewyvern
Copy link

{
    "errors": [
        {
            "message": "The request did not contain a valid GraphQL request.  Batch queries and APQ request are not currently supported for this API. Please ensure that your request contains a valid query and try again.",
            "extensions": {
                "stellate": {
                    "code": "INVALID_QUERY",
                    "details": {}
                }
            }
        }
    ]
}

Description

when using the Upload extension, normal requests without upload are executed with an error

in the demo i use the server https://countries.trevorblades.com/graphql
i also checked on the server of my project, requests are also not executed there, but a slightly different error

is this a bug on the extension side or on the server side?

Reproduction Steps/Repo Link

1: https://stackblitz.com/edit/vitejs-vite-x1myn4ba?file=src%2Fmain.ts
2: open network tab

@jasonkuhrt
Copy link
Member

Interesting! I'll investigate on my side over the next few days.

@jasonkuhrt jasonkuhrt pinned this issue Dec 24, 2024
@scythewyvern
Copy link
Author

'content-type': ``,

i noticed that without the extension server sends
content-type: application/graphql-response+json; charset=utf-8

but with the extension server sends
content-type: application/json

i understand why you are sending an empty content-type, but it looks like it is being sent empty on every request

is it possible to send an empty content-type only if the request contains upload?

@jasonkuhrt
Copy link
Member

is it possible to send an empty content-type only if the request contains upload?

Yes, and that is what it should be already doing :)

If you want to take a crack at a PR and test, feel free! If the issue is just the extension code, should be accessible for others to help here.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants