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

Import feature for graphql broken #9941

Closed
arghyaiitb opened this issue May 17, 2021 · 2 comments
Closed

Import feature for graphql broken #9941

arghyaiitb opened this issue May 17, 2021 · 2 comments

Comments

@arghyaiitb
Copy link

Describe the Issue
Import feature from cURL is not working when we try to import any graphql request. It is imported as a regular request with the graphql

Steps to Reproduce

  • Create a simple graphql query request
  • Get the curl request
    curl --location --request POST 'localhost:8080/abc' \ --header 'Content-Type: application/json' \ --data-raw '{"query":"query IntrospectionQuery {\n __schema {\n queryType { name }\n mutationType { name }\n subscriptionType { name }\n types {\n ...FullType\n }\n }\n}","variables":{}}'
  • Now import the graphql request from Raw text tab, putting the content generated above.
  • You would see the request getting imported as normal post request with the content being added as a text body

Following are the issues

  • The import request is not getting added into the proper graphql tab
  • The request imported as request body is also not working properly. For example \n is converted to n which ultimately gives syntax error

Screenshots or Videos
Untitled

Environment Information

  • Platform Type: Web/Desktop
  • Postman Version: All
  • Operating System: Any OS
@umeshp7
Copy link
Member

umeshp7 commented Jan 31, 2022

@arghyaiitb Thanks for reporting this.

We have noted this internally and will be tracking this. There is no way to clearly identify that its a GraphQL request just using the cURL command unless we look into the content. We can try to guess that its a graphql request by parsing the content of the data-raw. Currently the data-raw of curl command is mapped to a Raw body in Postman.

Having said that, its definitely a feature worth having and we will track this internally as a feature request. :)

@aman-v-singh
Copy link

Hey @arghyaiitb,
This feature will be available in the Postman App July 2023 Release.

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

No branches or pull requests

7 participants