graphql-client icon indicating copy to clipboard operation
graphql-client copied to clipboard

fragments_other_variant option is always on

Open frymawe opened this issue 1 year ago • 2 comments

The codegen option fragments_other_variant does not create any change in the code generated. The root cause I ran into was that the schema I was using actually had Other as one of the enumerations causing a conflict with the generated Other(&str). graphql_client_codegen/src/codegen/enums.rs Generates the Other(&str) without regard to the settings in options. It is probably a different issue, but coming up with a name less likely to collide than Other might be a good idea too.

frymawe avatar Mar 27 '23 21:03 frymawe

I'm getting hit by this as well:

error[E0428]: the name `Other` is defined multiple times
  --> src/cmds/creds/ls.rs:29:10
   |
29 | #[derive(GraphQLQuery)]
   |          ^^^^^^^^^^^^ `Other` redefined here

slyons avatar Dec 21 '23 22:12 slyons