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

Importing a collection removes example queries body (and variables) for graphql. #11298

Open
1 task done
nohehf opened this issue Sep 26, 2022 · 5 comments
Open
1 task done
Assignees
Labels
bug examples product/runtime protocol/graphql Issues relating to the GraphQL protocol within Postman

Comments

@nohehf
Copy link

nohehf commented Sep 26, 2022

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

Importing a collection (that follows the postman-collection spec 2.1), seems to remove the body (and variables) for graphql example queries. I discovered this issue here: Escape-Technologies/graphman#33

Steps To Reproduce

  1. Create a new collection containing at least one valid graphql query:
    I'll use:
    URL: https://rickandmortyapi.com/graphql
    Body:
query character($id: ID!) {
  character(id: $id) {
    name
  }
}

Variables:

{
	"id": "0"
}
  1. run the request
  2. save the response as an example
  3. export the collection
  4. re-import the .JSON that has been created in step 4.
  5. You can see that the body and variables are not in the imported collection. Tho the response is still here.

Screenshots or Videos

No response

Operating System

macOS

Postman Version

9.28.4

Postman Platform

Postman App

Additional Context?

No response

@DannyDainton
Copy link
Contributor

Hey @nohehf

Do you have a copy of the file that you're using, please? I can create this following the steps but it would be better if this was the one created from your Postman instance.

@DannyDainton DannyDainton added examples protocol/graphql Issues relating to the GraphQL protocol within Postman product/api-design labels Sep 27, 2022
@nohehf
Copy link
Author

nohehf commented Oct 3, 2022

example.postman_collection.json.zip
Here you go, this is a very simple collection, containing one graphql request and a mock example:
image
(PS: sorry for the delay)

@akshaydeo
Copy link

👋 @nohehf thank you for helping us here. We are actively looking into the fix. I will update this ticket as soon as we push the fix.

@VShingala
Copy link
Member

VShingala commented Dec 5, 2022

@akshaydeo Issue seems to be with collection import flow and not with generate collection from GraphQL definition flow here. I see that data for example request is present but in imported collection it's not present.

@sonnd08
Copy link

sonnd08 commented Aug 16, 2024

2024 already, any news on this?

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

No branches or pull requests

7 participants