Skip to main content
Solved

How to modify GraphQL filter using direct relation object name


Forum|alt.badge.img+4

I am learning GraphQL queries in Congite by following the documentation About data modeling | Cognite Documentation

How can I add an additional filter condition based on functionalLocationParent object name value.

query{
listEquipment (filter: {and: [{catalogProfileDescription: {eq: "Compressors"}}]}) {
  items { 
    externalId
    name
    description 
    catalogProfileDescription
    functionalLocationParent {
      name
      description
    }
    cfihosEquipmentClass {
      name
      description
    }
  }
}
}

Best answer by Dilini Fernando

Hi @sudheerchonate,

I hope you were able to try out Kanchana’s suggestion. As of now, I will close this thread. If you have any questions, please feel free to create a post on Hub.

Br,
Dilini 

View original
Did this topic help you find an answer to your question?

Forum|alt.badge.img

Hi @sudheerchonate ,

Could you please try using a filter similar to the one below?

 listEquipment (filter: {
    and: [
      {catalogProfileDescription: {eq: "Compressors"}},
      {functionalLocationParent: { name: { eq: "XXXXXX" } } }
    ]
  }) 

Regards,

Kanchana


Dilini Fernando
Seasoned Practitioner
Forum|alt.badge.img+2

Hi @sudheerchonate,

Did you manage to try Kanchana’s suggestion?

Best regards,
Dilini


Dilini Fernando
Seasoned Practitioner
Forum|alt.badge.img+2

Hi @sudheerchonate,

I hope you were able to try out Kanchana’s suggestion. As of now, I will close this thread. If you have any questions, please feel free to create a post on Hub.

Br,
Dilini 


Reply


Cookie Policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings