Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

insomnia-plugin-graphql-query-generator

tgerhardt9152MIT1.1.4
graphql, gql, GraphQL, insomnia

readme

insomnia-plugin-graphql-query-generator

Installation

  • Open Insomnia > Preferences > Plugins
  • Type insomnia-plugin-graphql-query-generator and install the plugin.

How To Use

  • Open a workspace and click the workflow actions dropdown
  • Select GraphQL Query Generator: Settings to manage headers for the schema query and default headers for GraphQL operations

    Headers are entered in JSON format eg. {"headerName": "headerValue", "anotherHeaderName": "anotherHeaderValue"} Insomnia environment variables can be used in the default headers, e.g. {"headerName": "{{_.envVarName}}"}

  • Select GraphQL Query Generator: From URL to import GraphQL operations via URL
    • In the Import URL field, you must supply the full URL of the GraphQL api you are trying to import from e.g. http://mygraphqlserver.net/graphql
    • In the Folder Name field, supply the base folder name that will be used (will be appended with 'queries', 'mutations' etc.)
    • In the Generated Request Base URL field, supply the base URL for generated operations

      Environment variables can be used here, e.g. {{_.myBaseUrl}}

Credits

GraphQL generation largely borrowed and modified from James Gatz's graphql codegen plugin github

changelog

1.1.4 - Release Date: 09/12/22

  • Changes -Introspection query uses XMLHttp

1.0.4

  • Additions:
    • default variables for int, float and boolean variables
    • default values in import from URL form
    • import from URL form will auto-populate base url with import url
    • base URL no longer auto-appends /graphql
    • todo in readme

1.0.2 - Release Date: 08/15/22

  • Additions:
    • copied README into dir for npm

1.0.3 - Release Date: 08/16/22

  • Additions:
    • adds missing typescript dependency

1.0.5 - Release Date: 08/16/22

  • Additions:
    • Icons for dropdown actions and insomnia plugin page

1.1.0 - Release Date: 08/19/22

  • Changes:
    • Changed React code to be more performant and solve crash issues when running latest version of insomnia

1.1.2 - Release Date: 08/19/22

  • Changes:
    • Save button on settings component will be disabled unless json is valid