GraphQL Asset Management API reference
In this section, you will find information regarding all the queries and mutations that are available together with their associated input and output objects.
Expand each section in the sidebar to find out more.
The GraphQL playground makes it easier to build your queries, and you may want to use it as a starting point.
Use a GraphQL query when you need to retrieve data from the server. GraphQL queries are comparable to GET requests in REST APIs. When forming a query, as well as the query name you must specify the output object in the correct format by using nested subfields until you return only scalars. GraphQL queries return only the data you specify - the available fields for each query are defined in the query's
Type section and are detailed under
Objects. Some queries also require arguments to be specified.
We have included some example queries.
Use a GraphQL mutation to perform any kind operation that changes data on the server. GraphQL mutations are comparable to
DELETE requests in REST APIs. To form a mutation you must specify the mutation name, the input object and the output object. The required input object for each mutation is defined under it's Arguments section and detailed under Inputs. The fields available for the output object are defined in the mutation's
Type section, and are detailed under
We have included some example mutations.
GraphQL objects represent the different kinds of resources you can access using this API. An object can contain a list of fields, which could be in the form of strings or integers.
Interfaces serve as parent objects that contain their own list of named fields that are shared by other child objects. They can be thought of as umbrella objects that have many other subfields or objects that fall under them.
Enums (or enumerations) define a certain set of values or entries for a field. They help filter down your results, and can contain alphanumeric characters, and underscores. An example of an enum would be
AssetType which would require you to define the type of asset you'd like to query.
Inputs include a set of fields that require some sort of input from the user that can help define an object within the data. For example,
UpdateTeamInput requires you to input the name of the team you'd like to update.
Directives can be described as instructive values that help specify the behaviour of the query when returning assets. These can be used in combination with booleans. For example, the
skip directive allows you to skip a certain field when the if argument is true.
Scalars are values that come in the following types:
ID. Before you can return scalars, you must specify the nested subfields required beforehand. For example, before returning an ID, you may need to state your edges and nodes.