Skip to main content

I have a new issue with the GraphQL query, appreciate any help.

I have this query and I want to only pull back subscriptions where the subscription role name = Application Owner. 

query AllFactSheets {
allFactSheets(factSheetType: Application) {
edges {
node {
id
name
type
... on Application {
DRTargetTier
CurrentStatus
Description
BusinessImpact
subscriptions {
edges {
node {
user {
displayName
}
roles(filter: {name: "Application Owner"}) {
name
}
}
}
}
}
}
}
}
}

Using the above query gives an error (Validation error of type UnknownArgument: Unknown field argument filter) - So I presume either a) I can’t filter on the role name, or b) I’m misformatting it? 

Hi @Graham ,

There is no filter argument defined in the schema for roles. You will have to use the filter on subscription type and then handle unwanted roles in code.

hint: use the GraphiQL tool (in the Administration Developer Tools section) and GraphiQL Explorer to facilitate building your query in accordance to the Schema:

Hope it helps.

Cheers.


Reply