GraphQL API Preview

Can I get updated documentation for the GraphQL API?

I’m getting the following error when running an example query from the documentation.

Error: {‘errors’: [{‘message’: “Validation error of type FieldUndefined: Field ‘agentVersion’ in type ‘Agent’ is undefined @ ‘organization/assets/edges/node/agent/agentVersion’”

If I remove ‘agentVersion’ and add another field such as ‘agentStatus’ it works. However, I am interested in the ‘agentVersion’.

query($orgId: String!) {
  organization(id: $orgId) {
     assets(first: 10000) {
         edges {
           node {
             id
             agent {
                id
                agentVersion
               }
             }
          }
       }
    }
 }

Thanks

I think you’re looking for “agentSemanticVersion”

If you use something like Postman and load in your GraphQL endpoint it should populate all of this for you and makes it much easier to work with:
Screenshot 2023-04-28 at 9.23.48 PM

1 Like

Hey @john_hartman,

Thanks! I can’t seem to get Postman to show the “Query” window like yours but I believe the following gives me enough information to find the fields.

image

Open a new collection and start a new request as a GraphQL request instead of a typical HTTP request. Postman won’t let you start a GraphQL request in a collection that already has an HTTP request in it.