Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

178
Views
I have a React client-side project and a Node.js/GraphQL api in two separate repo's

In my React app, I want to pass an object as variable type into my mutation. Here's how my mutation looks like:

export const PAR_CREATE = gql`
    input Resources {
        resourceName: String
        quantity: String
        sequenceNo: String
    }
    mutation createPAR(
        $resourceType: String
        $title: String
        $description: String
        $dropOfName: String
        $dropOfAddress: String
        $endDate: String
        $studentsImpacted: String
        $schoolId: String
        $resources: [Resources]
    ) {
        createPAR(
            resourceType: $resourceType
            title: $title
            description: $description
            dropOfName: $dropOfName
            dropOfAddress: $dropOfAddress
            endDate: $endDate
            studentsImpacted: $studentsImpacted
            schoolId: $schoolId
            resources: $resources
        ) {
            id
        }
    }
`;

In my Node.js project I have the following schema:

type Mutation {
    createPAR(
        resourceType: String
        title: String
        description: String
        dropOfName: String
        dropOfAddress: String
        endDate: String
        studentsImpacted: String
        schoolId: String
        resources: [Resources]
    ): parResponse
}

input Resources {
    resourceName: String
    quantity: String
    sequenceNo: String
}

i am getting this issue "Invariant Violation: Schema type definitions not allowed in queries. Found: "InputObjectTypeDefinition"

can any one help

about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!