Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Schema auto-fetch doesn't run pre-request scripts correctly #11899

Open
1 task done
innermatrix opened this issue Apr 6, 2023 · 5 comments
Open
1 task done

Schema auto-fetch doesn't run pre-request scripts correctly #11899

innermatrix opened this issue Apr 6, 2023 · 5 comments
Assignees
Labels
protocol/graphql Issues relating to the GraphQL protocol within Postman

Comments

@innermatrix
Copy link

Is there an existing issue for this?

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

Describe the Issue

GraphQL request in a nested folder doesn't run pre-request scripts from all ancestor folders

Steps To Reproduce

  • Create folder A
  • Create pre-request script for folder A
  • Create folder B in folder A
  • Create pre-request script for folder B
  • Create GraphQL request C in folder B
  • Send request C
    • This works correctly; PRS for A runs → PRS for B runs → C is sent
  • Turn on schema auto-fetch for C
  • Click the refresh button to cause schema auto-fetch to take place
    • This doesn't work correctly: PRS for A doesn't run, but PRS for B does run

This is a show-stopper because in my case A has a PRS that setups up some globals that the PRS in B uses, so the PRS for B completely fails, and as. result the schema auto-fetch doesn't have the credentials it needs to succeed

Screenshots or Videos

No response

Operating System

macOS

Postman Version

10.12.10

Postman Platform

Postman App

User Account Type

Signed In User

Additional Context?

Probably related to #10957 but in my case one of the scripts is running and the other isn't.

@SterlingChin SterlingChin added the protocol/graphql Issues relating to the GraphQL protocol within Postman label Apr 6, 2023
@SterlingChin
Copy link

Is this issue in the v1 GraphQL client or in the beta v2 GraphQL client?

@innermatrix
Copy link
Author

How would I check? I sent this to Postman support and they sent me here because "GraphQL is in beta" — I didn't even realize there was a non-beta option 🙂

@SterlingChin
Copy link

I'm sorry for the confusion. You can use GraphQL in the HTTP client (this is what I'm referring to as v1) or you can use the new client in beta, which is a dedicated GraphQL Client. See gif below to see the new beta client.

graphql-beta

@innermatrix
Copy link
Author

Oh, I see, I was totally unaware of the new beta client. The issue I reported is in the HTTP client.

Screen.Recording.2023-04-04.at.6.54.11.PM.mov

@SterlingChin
Copy link

That makes sense. I appreciate the clarification and thank you for the gif! I'll pass this to the right team!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
protocol/graphql Issues relating to the GraphQL protocol within Postman
Projects
None yet
Development

No branches or pull requests

3 participants