Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I am building GraphQL API and I really like code-first style so thank you for this tool.

While code-first style is more convenient and eliminates duplication the generated schema and introspection query (used by GraphiQL) doesn’t look as good as handwritten. So I would like to improve it.

First think is order of fields. Currently introspection query returns fields in no particular order. I think they should be at least sorted alphabetically but even better would be possibility to specify their order. Since order in source code is not much useful here (fields can come from different classes) I would add some annotation which could be used to list names of fields in required order, something simitar to @XmlType.propOrder.

In 680f20d commit I added @GraphQLType.propOrder but it could be for example @GraphQLType.fieldOrder or separate annotation. It should also be added to @GraphQLInterface.

Does this feature make sense for you and should I finish it and create PR? If yes, how exactly the annotation should look like?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

kaqqaocommented, Dec 22, 2017

I think you’re right… This does end up being the documentation for the human as well. As such if should be nice. So, yes, if you’re interested in developing this feature please go forward. As for the attribute name, I’d go for fieldOrder to be consistent with the GraphQL terminology.

vojtechhabartacommented, Dec 31, 2017

Thanks for merging my PR.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Field order - Wikipedia
Field order · A type of playback for interlaced video · A way of presenting information about a military situation in the field,...
Read more >
Order Fields - Salesforce Help
Orders and reduction orders have the following fields. Field, Description. Account Name, Name of the account associated with the order. (Read-only for reduction ......
Read more >
Field Order
The Field Order processor orders fields in a map or list-map field and outputs the fields into a list-map or list root field....
Read more >
Field Order Definition: 309 Samples - Law Insider
Field Order means a written order that orders minor changes in the Work but which does not involve a change in the Contract...
Read more >
Order fields of structure array - MATLAB orderfields - MathWorks
S = orderfields( S1 ) orders the fields in S1 by name. Since field names can contain only letters, digits, and underscores, this...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found