python – How do I include a filter in GraphQL query?

I have the following GraphQL query:

{

  instances(filter {operatingsystem.name: {contains: "linux machine"}}) {

    edges {

      machine {

        name

        ip

        operatingsystem {

         name

        }

      }

    }

  }

}

I am trying to filter out the list of the instances, for which the “name” field of the “operatingsystem” contains a superstring of “linux machine”. So “linux machine 1”, “linux machine redhat”, etc. all are included.
Unfortunately when I run the following code, I get a “GRAPHQL_PARSE_FAILED” error.

Read more here: Source link