Escape-Technologies / graphman

Quikly scaffold a postman collection for a GraphQL API. Compatible with Postman & Insomnia.
MIT License
240 stars 12 forks source link

Import of collection to Postman ends with error "format not recognized" #50

Closed ghost closed 1 year ago

ghost commented 1 year ago

When I import collection generated by Graphman v1.2.0 to Postman (version 10.8.0 and version 9.31.0) it fails with error message Error while importing: format not recognized

Beginning of generated collection:

{
    "postmanCollection": {
        "info": {
            "name": "rori-editor.backend.doeg8.praha.tmapy.cz-GraphMan",
            "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
        },
        "item": [
            {
                "name": "Queries",
                "item": [
                    {
                        "name": "mapApp",
                        "request": {
                            "method": "POST",
                            "header": [],
                            "body": {
                                "mode": "graphql",
                                "graphql": {
                                    "query": "query mapApp($id: GlobalID!) {\n  mapApp(id: $id) {\n    __typename\n    id\n    slug\n    title\n  }\n}",
                                    "variables": "{\n\t\"id\": null\n}"
                                }
                            },
...

Any hint how to fix it?

ghost commented 1 year ago

Older version of Graphman (1.1.4) generate collection that I can import without errors.

nohehf commented 1 year ago

Oh, that shouldn't be the case. I would like to fix this asap but it's hard without more context. I'll check the diffs between 1.1.4 & 1.2.0 to check what could be the cause. In the meantime, if you have any more information I'll be glad to get through it.

nohehf commented 1 year ago

Just released v1.2.1 which fixes a bug (and introduces a new flag). It works well on several APIs I tried on. Could you check if this has fixed your issue?

ghost commented 1 year ago

Thanks for fix. It woks great now.