postmanlabs / postman-app-support

Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster.
https://www.postman.com
5.86k stars 840 forks source link

GraphQL Requests not appearing in Postman Console #12855

Open ShaneDonaghy-catapult opened 6 months ago

ShaneDonaghy-catapult commented 6 months ago

Is there an existing issue for this?

Describe the Issue

Sent HTTP requests through postman appear in the console, as expected. The new GraphQL request type will send the request fine, but it does not appear in the console.

Steps To Reproduce

  1. Create an HTTP collection
  2. Change Method to POST
  3. Paste https://rickandmortyapi.com/graphql in URL bar
  4. For Body, go to GraphQL section and paste:
    query character($id: ID!) {
    character(id: $id) {
     id
        name
        status
        species
        type
        gender
        image
        created
    }
    }

    in Query section and:

    {
    "id": "324"
    }

    in variables section.

  5. Open Console
  6. Send Request and Observe in Console
  7. Create a new Blank Collection
  8. In top right of Sidebar click 'New'
  9. Choose GraphQL request type
  10. Paste https://rickandmortyapi.com/graphql in url bar and wait for schema to load
  11. Check customer box
  12. Enter 324 in id filter box
  13. Click 'Query'
  14. Observe no line item printed to console

Screenshots or Videos

No response

Operating System

macOS

Postman Version

11.0.11

Postman Platform

Postman App

User Account Type

Signed In User

Additional Context?

No response

ronork commented 6 months ago

Hey @ShaneDonaghy-catapult , thank you for reporting the issue. While we do support logging for HTTP, we're currently exploring options for integrating other protocols like GraphQL into the console. Could you provide more details on the specific information you're looking for in the console ?

dcrockwell commented 6 months ago

This is a major missing feature. There's no way to tell whether postman is writing the headers for auth correctly. If there's an auth error, there's no way to debug the request.

ShaneDonaghy-catapult commented 6 months ago

Hey @ShaneDonaghy-catapult , thank you for reporting the issue. While we do support logging for HTTP, we're currently exploring options for integrating other protocols like GraphQL into the console. Could you provide more details on the specific information you're looking for in the console ?

Hey @ronork , I use Postman as a more user-friendly tool to get requests working before I port them to my test automation framework. For that to work I need to see auth headers, etc., What I'd be after ideally is feature parity with HTTP requests vis-a-vis the console.

jkmartindale commented 5 months ago

Lost a ton of productivity because of this

larrysanbornthermo commented 3 months ago

@ronork - The postman console shows the transaction to get a new token for OAuth in a graphql collection but not the graphql query which is still just an HTTP POST. I agree, feature parity with 'send' functionality against rest api's is what's needed.

I use postman to build queries against existing API's then use those details to build automation (console app, powershell, what ever) same as @ShaneDonaghy-catapult

GauthierPLM commented 1 month ago

The console is generally very useful to ensure a request was properly configured (header missing, incorrect value in env, ...). I miss this with GraphQL as I have no way to ensure the headers or generated query had all variables correctly replaced.

joamla96 commented 1 week ago

+1 currently trying to figure out whats going wrong with my request. Keep getting 401 errors, despite seemingly having configured it correctly.

Would be amazing to have an option to double check how and what headers is actually being sent.

IainAdamsLabs commented 1 day ago

Same camp here. Really unable to debug why its not working without the raw request being present in the console.