# Custom Graphql type as Postman variable

**URL:** <https://community.postman.com/t/custom-graphql-type-as-postman-variable/28209>\
**Category:** Help Hub\
**Tags:** graphql\
**Created:** [September 28, 2021, 1:48pm UTC](https://community.postman.com/t/custom-graphql-type-as-postman-variable/28209 "2021-09-28T13:48:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aviation-observer-43](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/aviation-observer-43/32/9862_2.png) [@aviation-observer-43](https://community.postman.com/u/aviation-observer-43)\
**Post date:** [September 28, 2021, 1:48pm UTC](https://community.postman.com/t/custom-graphql-type-as-postman-variable/28209/1 "2021-09-28T13:48:43Z")

</div>

Hi, all.  
I’m new to GraphQL and I’m struggling to get one mutation to pass using Postman. It’s not an open API, I got it to work using the inbuilt playground feature but Postman is giving me trouble.  
Mutation accepts a custom type for a variable.  
 ![image](https://us1.discourse-cdn.com/getpostman/original/2X/f/fddd564f713c112121dcd016f9111038d11c099a.png)

This custom type is basically a JSON but I cannot get it to work.

What I’ve tried so far:

- hardcoding the entire request works - ![image_2021-09-28_154047](https://us1.discourse-cdn.com/getpostman/original/2X/e/ee22f3e25bdd03d588b947d96e32af33e3ba4ee6.png) etc…(there’s more fields, but this start is crucial)

I’ve tried placing the data from the request to an environment variable and tried using GraphQL variable - that doesn’t work

Error I get is Invalid body

I tried using postman variables directly into the GraphQL request…that kinda works but I’m getting syntax errors:

![image](https://us1.discourse-cdn.com/getpostman/original/2X/8/8f2101ea8937dd5845d43ce0cc478dad7527d933.png)  
So this works but there is a squigly line at {{ saying “Expectd name, found {”  
Placing {{mutationRequest}} under quotations results in

Invalid syntax: token recognition error at: ‘"{ \n’ at line 2 column 30"

I’m kinda spinning in circles…could a fresh pair of eyes help me figure out what’s wrong judging by these screenshots?
