Skip to content

Enums doc is wrong #1029

Closed
Closed
@RDruon

Description

@RDruon

Describe the bug
Enums docs states that corresponding string values for the enum variants are all in uppercase. This is not the case

To Reproduce
Declare an enum like

#[derive(Debug, Clone, Copy, serde::Serialize, serde::Deserialize)]
#[cfg_attr(feature = "graphql", derive(juniper::GraphQLEnum))]
pub enum ConfigType {
    New,
    AlreadyExisting,
}

When querying the GraphQL enum I got the following output

[root@node1 ~]# curl -k https://localhost/graphql_schema 2> /dev/null | grep "enum ConfigType" -A 4
enum ConfigType {
  NEW
  ALREADY_EXISTING
}

Expected behavior
Following the docs I was expecting:

[root@node1 ~]# curl -k https://localhost/graphql_schema 2> /dev/null | grep "enum ConfigType" -A 4
enum ConfigType {
  NEW
  ALREADYEXISTING
}

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingk::documentationRelated to project documentation

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions