postman-app-support icon indicating copy to clipboard operation
postman-app-support copied to clipboard

Unable to use cookies from the cookie jar in a GraphQL request

Open deinspanjer opened this issue 2 years ago • 3 comments

Is there an existing issue for this?

  • [X] I have searched the tracker for existing similar issues and I know that duplicates will be closed

Describe the Issue

If you create an HTTP request and set the body type to GraphQL, you can take advantage of cookies in the cookie jar that come from Postman Interceptor or otherwise without a problem.

If you create a GraphQL request, it does not automatically include the Cookie header, and there doesn't appear to be a way to enable that.

Steps To Reproduce

  1. Configure Postman Interceptor or manually add a cookie to the cookie jar
  2. Create a new request of type HTTP
  3. Set the URL to a GraphQL server on the domain that has the cookie in your jar
  4. Observe that the Cookie header is automatically added to the Headers section and is populated with the cookies for that domain from the jar.
  5. Create a new request of type GraphQL
  6. Set the URL to a GraphQL server on the domain that has the cookie in your jar
  7. Observe that this time there is no the Cookie header added to the Headers section.

Screenshots or Videos

No response

Operating System

macOS

Postman Version

10.23.10

Postman Platform

Postman App

User Account Type

Signed In User

Additional Context?

No response

deinspanjer avatar Mar 06 '24 23:03 deinspanjer

Hey @deinspanjer!

The GraphQL client currently doesn't support cookies. We will take note of this as a feature request and update here once it is available.

appurva21 avatar Mar 07 '24 04:03 appurva21

Hello, is there any news on this feature ? Much needed here since I'm working on a GraphQL API with auth from cookies :(

EnzoPV25 avatar Aug 05 '24 11:08 EnzoPV25

Also wondering about timing for this feature, thanks!

kchasel avatar Sep 16 '24 21:09 kchasel

Waiting for this feature. thanks

harry-nutsfi avatar Sep 25 '24 03:09 harry-nutsfi

Also waiting for this feature. Authenticating via a REST API, setting session data in Redis and storing cookies to identify the session when fetching data via GraphQL.

jonathan-nielsen avatar Oct 08 '24 14:10 jonathan-nielsen

GraphQL is just a glorified interface for REST API call, I'm looking for this feature too.

linkthai avatar Oct 18 '24 08:10 linkthai

This would be needed. However you can still use Headers as a workaround. Just set key as Cookie and add your cookie there.

Ogglas avatar Feb 17 '25 10:02 Ogglas

Def looking for this feature.

drusellers avatar Jun 11 '25 12:06 drusellers

I really need this feature too. My GraphQL API handles authentication with cookies, so I frequently forget that Postman doesn't handle cookies for GraphQL, and end up wasting time debugging my code only to find that's why my request isn't working.

chukssomzzy avatar Jul 19 '25 06:07 chukssomzzy