Skip to content

Default enum values ignored when parsing a schema #111

Closed
@charmasaur

Description

@charmasaur

The following code:

import graphql
schema = graphql.build_ast_schema(graphql.parse("""
enum Enum {
  DEFAULT
}
input Input {
  enumField: Enum = DEFAULT
}"""))
print(schema.type_map['Input'].fields['enumField'].default_value)

produces None.

I guess I'm not really sure what it should be returning, but I think "DEFAULT" would be more appropriate than None.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions