You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is the listProducts example for GraphQL and I got it to work in my application, but now I need help with InventoryLevel.
Do you have an example of how to retrieve inventoryLevel?
Here's my code, but I am getting error (undefinedField: Field 'inventoryLevels' doesn't exist on type 'QueryRoot')
var graphRequest = new GraphRequest
{
Query = """
query inventoryLevelItems($limit: Int!, $id: ID!) {
inventoryLevels(first: $limit, id: $id) {
id
inventoryLevels(first: 10) {
edges {
node {
id
location {
id
name
}
quantities(names: ["available"]) {
name
quantity
}
}
}
}
}
}
""",
Variables = new Dictionary<string, object>
{
{"limit", 10},
{"id", itemId}
}
};
public record ListInventoryLevelItemsResult
{
[StringSyntax("GraphQL")]
public required InventoryLevelConnection InventoryLevelItems { get; set; } = new();
}
The text was updated successfully, but these errors were encountered:
There is the listProducts example for GraphQL and I got it to work in my application, but now I need help with InventoryLevel.
Do you have an example of how to retrieve inventoryLevel?
Here's my code, but I am getting error (undefinedField: Field 'inventoryLevels' doesn't exist on type 'QueryRoot')
var graphRequest = new GraphRequest
{
Query = """
query inventoryLevelItems($limit: Int!, $id: ID!) {
inventoryLevels(first: $limit, id: $id) {
id
inventoryLevels(first: 10) {
edges {
node {
id
location {
id
name
}
quantities(names: ["available"]) {
name
quantity
}
}
}
}
}
}
""",
Variables = new Dictionary<string, object>
{
{"limit", 10},
{"id", itemId}
}
};
public record ListInventoryLevelItemsResult
{
[StringSyntax("GraphQL")]
}
The text was updated successfully, but these errors were encountered: