Enigmatis / graphql-java-annotations

GraphQL Annotations for Java
Other
387 stars 97 forks source link

When using the default strategy that prettifies the fields, schema field order depends on original method name #241

Closed trunkate closed 1 year ago

trunkate commented 4 years ago

Although the output is deterministic, I didn't found a way to order the fields alphabetically.

For example:

public interface Sample {
    @GraphQLField
    Integer getId();

    @GraphQLField
    Boolean isActive();
}
type Sample {
  id: Int
  active: Boolean
}

any idea how to solve this?

Thanks

yarinvak commented 4 years ago

When you order your fields in the Sample class alphabetically, isn't it appears alphabetically in the graphql type?

graphql-java-annotations does not support ordering of fields, although it can be a nice feature

trunkate commented 4 years ago

Fields are ordered, but when prettified, the method name is used, is..() come after get..()

Fgerthoffert commented 1 year ago

Hi @trunkate ,

We're helping with project maintenance and reviewing the list of opened PRs and Issues.

This issue was created quite a while ago, we were wondering if you were still interested in the outcome, please let us know if this is the case.

Without an answer by July 1st, 2023, this issue will be closed as "inactive" (and can always be re-opened later on if needed).

Thanks,