Best way to construct a GraphQL query string in Python
You can use the “”” multiline string method. For injecting variables, make sure to use the $ sign while defining the string and use the variables object in the JSON parameter of the requests.post method. Here is an example. ContactInput is one of the types I defined in my GraphQL schema. query = “”” mutation … Read more