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

[Bug] Importing from a Insomnia collection #1024

Closed
rubnogueira opened this issue Nov 22, 2023 · 3 comments · Fixed by #1078
Closed

[Bug] Importing from a Insomnia collection #1024

rubnogueira opened this issue Nov 22, 2023 · 3 comments · Fixed by #1078
Labels
bug Something isn't working good first issue Good for newcomers help wanted Community contribution is welcome

Comments

@rubnogueira
Copy link

I'm trying to import an Insomnia collection, and I'm getting this validation error on developer tools. This file was exported from Insomnia.

ValidationError: items[41].request.body.graphql.variables must be a `string` type, but the final value was: `{}`.
    at Object.b [as createError] (_app-5953c08eb88e44dd.js:1:1145238)
    at Object.test (_app-5953c08eb88e44dd.js:1:1153120)
    at t (_app-5953c08eb88e44dd.js:1:1145739)
    at j (_app-5953c08eb88e44dd.js:1:1143306)
    at ne._validate (_app-5953c08eb88e44dd.js:1:1150667)
    at ne.validate (_app-5953c08eb88e44dd.js:1:1150894)
    at _app-5953c08eb88e44dd.js:1:1164325
    at j (_app-5953c08eb88e44dd.js:1:1143306)
    at _app-5953c08eb88e44dd.js:1:1164416
    at _app-5953c08eb88e44dd.js:1:1143177
@helloanoop helloanoop added bug Something isn't working good first issue Good for newcomers help wanted Community contribution is welcome labels Nov 22, 2023
@nelup20
Copy link
Contributor

nelup20 commented Nov 27, 2023

Hey @rubnogueira 👋, I've tried but can't seem to reproduce this bug. Could you please provide an example of the GraphQL query that causes this issue when importing?

@rubnogueira
Copy link
Author

Hey @nelup20. I was able to "import" the collection by manually editing the file and editing the empty text node to "{}".

{
    "_id": "req_123123",
    "_type": "request",
    "authentication": {},
    "body": {
        "mimeType": "application/graphql",
        "text": ""
    },
    "created": 123123,
    "description": "",
    "headers": [
        {
            "name": "Content-Type",
            "value": "application/json"
        }
    ],
    "isPrivate": false,
    "metaSortKey": -123123,
    "method": "POST",
    "modified": 123123,
    "name": "New Request",
    "parameters": [],
    "parentId": "xxxxxxxx",
    "settingDisableRenderRequestBody": false,
    "settingEncodeUrl": true,
    "settingFollowRedirects": "global",
    "settingRebuildPath": true,
    "settingSendCookies": true,
    "settingStoreCookies": true,
    "url": "https://xxxxxxxxx"
},

@nelup20
Copy link
Contributor

nelup20 commented Nov 27, 2023

Perfect, thanks @rubnogueira! I was able to reproduce it, I'll work on it 👍

nelup20 added a commit to nelup20/bruno that referenced this issue Nov 28, 2023
helloanoop added a commit that referenced this issue Nov 29, 2023
…somnia_collection

fix(#1024): Fix validation error on GraphQL request when importing Insomnia collection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Community contribution is welcome
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants