GraphQL in Postman Set up
Creating a query in Postman
In postman create a new POST request tab.
Set the url to this:
{ServerUrl}/api/graphql/:repoParams
:repo - Name of repositoryUse Bearer Token as the authorization type and paste in your login token or postman variable that contains the token.
Select GraphQL as the body type and set Schema to Auto Fetch.
Put your query in the QUERY window and any variables in the GRAPHQL VARIABLES window and click Send to get your response.
QUERY
query Query($settings: QuerySettings) { items(settings: $settings) { count items { ... on File { name id slug } ... on Image { name id slug } ... on Video { name id slug } ... on Upload { name id slug } } }}GRAPHQL VARIABLES
{ "settings": { "query": "pick", "types": ["upload"] }}Response
{ "data": { "items": { "count": 1, "items": [ { "name": "pick-me", "id": "ITEM_FC406437FD4845A0BF773DD51371FB8B", "slug": "upload_1714767852437_pickme" } ] } }}