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

buildOperationNodeForField formatting variable declaring and usage in different ways

Open ighormartins opened this issue 4 years ago • 1 comments

For a graphql query declared like this:

user(
order_by: [user_order_by!]
): [user!]!

If I Print (using graphql-js) the result of buildOperationsNodeForField, it's is returning something like this:

query user($order_by: [user_order_by!]) {
  user(order_by: $orderBy, where: $where) {
    id
  }
}

It's keeping underscore on the variable declaration, but then applying camelCase when using the variable.

ighormartins avatar Jan 07 '21 15:01 ighormartins

Would you create a draft PR so we can help you?

ardatan avatar Apr 14 '21 18:04 ardatan

Closing the issue because a reproduction is missing. Let us know if the issue still remains and feel free to create a new issue with a reproduction. Thanks!

ardatan avatar Mar 29 '23 05:03 ardatan