leto icon indicating copy to clipboard operation
leto copied to clipboard

Add "name" to @GraphQLArg decorator

Open tigloo opened this issue 1 year ago • 0 comments

I need to build an API that uses query parameter names which clash with reserved words in Dart, such as "class" or "extension". Due to this, I need to choose an alternative parameter name when declaring the query function but would like to remap it to the original argument name from the GraphQL spec.

Example:

@Query(name: "AccountList") Function<Account?> accountList( @GraphQLArg(name: "class") String? class_ ) {...}

tigloo avatar Jan 13 '24 15:01 tigloo