dapalex / py-graphql-mapper

A python library for generating GraphQL queries and mutations using plain python objects, no hardcoded strings.Any questions or issues, please report here https://github.com/dapalex/py-graphql-mapper/issues
MIT License
19 stars 1 forks source link

From argument definition via field assignment to kwargs parameters #8

Closed dapalex closed 1 year ago

dapalex commented 1 year ago
query = currencies()
query.name = 'myCurrenciesQuery'
query._args.first = 1
query._args.after = 'MG=='

_"would it perhaps make sense to have the name as a positional-only first parameter of the query, and then have **kwargs that automatically get mapped to the query arguments

your first example could then be currencies('queryName', first=1, after='MG=='), which seems more intuitive and less redundant (to me)"_