zino-hofmann / graphql-flutter

A GraphQL client for Flutter, bringing all the features from a modern GraphQL client to one easy to use package.
https://zino-hofmann.github.io/graphql-flutter
MIT License
3.25k stars 620 forks source link

Enum value 'index' will result in error #1233

Closed steebchen closed 2 years ago

steebchen commented 2 years ago

When using an enum with a value 'index':

enum Stuff {
  index
}

This error pops up on generation:

[SEVERE] json_serializable:json_serializable on lib/graphql/graphql_gen.graphql.dart:

Bad state: Too many elements

Every other value seems to work.

budde377 commented 2 years ago

This seem like a problem with your serialiser code generator rather than the client library.