question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature Request] Show enum information in GraphQL schema explorer

See original GitHub issue
  • Insomnia Version: 7.0.1
  • Operating System: Ubuntu 18.04

Details

I noticed that the GraphQL schema explorer does not list the available values on enums.

An introspection query like the following will give the information about the given enum:

{
  __type(name: "SomeFancyEnum") {
    enumValues {
      name
      description
      isDeprecated
      deprecationReason
    }
  }
}

For me, using HotChocolate for .Net Core, the above returns something like:

{
  "data": {
    "__type": {
      "enumValues": [
        {
          "name": "REINDEER",
          "description": "Sleigh propulsion system",
          "isDeprecated": false,
          "deprecationReason": null
        },
        {
          "name": "SANTA",
          "description": "Flag a thing as being Santa",
          "isDeprecated": false,
          "deprecationReason": null
        },
        {
          "name": "SATAN",
          "description": "Flag a thing as being Santa",
          "isDeprecated": true,
          "deprecationReason": "Ooops.. typo"
        }
      ]
    }
  }
}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
gschiercommented, Nov 15, 2019

How’s this?

image

2reactions
gschiercommented, Oct 11, 2019

Ah yes, I just forgot to implement docs for enum types. Should be an easy addition! 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Feature Request] Show enum information in GraphQL ...
I noticed that the GraphQL schema explorer does not list the available values on enums. An introspection query like the following will give...
Read more >
The enum type | Side Quest: Intermediate Schema Design
An enum is a GraphQL schema type that represents a predefined list of possible values. For example, in Airlock, listings can be a...
Read more >
What you need to know about GraphQL enums
Learn how GraphQL enums can help you build more robust and discoverable APIs, create simple interfaces, maintain slim resolvers, and more.
Read more >
Enums - TypeGraphQL
Enums in TypeGraphQL are designed with server side in mind - the runtime will map the string value from input into a corresponding...
Read more >
Do GraphQL enum types resolve their values automatically?
Yes, you need to write a resolver from the enum values to whatever you need, e.g. numbers, per the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found