question / feature - generating lists of items within gql statement.
See original GitHub issueI have a mutation on my Apollo Server which allows for 0-N items in the request. Given the following have you guys any advice on how handle adding 0 or N items ? The base GQL minus the items on the item array is getting correctly generated and being received by my server.
an_item = {
"prop": 123,
}
apply_mutation = gql('''
mutation apply($id: String!, $items: DiscountItemInput!) {
applyDiscount(
applyObject: {
orderId: $id
storeId: 2
items: [
# can I do variable substitution using a dict here ?
{
},
.... 0 - N item
]
}
) {
... list of fields to be returned
}
}
''')
params = {
"Id": 123
}
client.execute(apply_mutation, variable_values=params)
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Queries and Mutations - GraphQL
GraphQL queries look the same for both single items or lists of items; however, we know which one to expect based on what...
Read more >How to query list of objects with array as an argument in ...
Show activity on this post. I'm trying to query a list of objects having array of IDs. Something similar to following SQL query:...
Read more >Query syntax | BigQuery - Google Cloud
Query statements scan one or more tables or expressions and return the computed result rows. This topic describes the syntax for SQL queries...
Read more >TOP-70 Most Important SQL Queries in 2022 - ByteScout
SQL Query for Retrieving Tables. This query can be run to retrieve the list of tables present in a database where the database...
Read more >Best practices for writing SQL queries - Metabase
The SQL editor in Metabase features a handy data reference tab (accessible via the book icon), where you can browse through the tables...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Also, can you try with the latest v3.0.0a0?
Closing now for housekeeping purposes.