Coder Social home page Coder Social logo

Comments (3)

benjie avatar benjie commented on May 20, 2024

The error tells you what’s wrong: your queries are invalid. Use the GraphiQL interface to learn what fields are available/required. Please follow the issue template in future.

from starter.

libinvarkey avatar libinvarkey commented on May 20, 2024

In my test test ,i passed the id but it shows Field "UpdateDmsPhysicalRwTblServiceAdvisorInput.nodeId" of required type "ID!" was not provided
("allDmsPhysicalRoVwStoreMasters", async () => {
//const data = GetDashboardItemsData;
await RunGraphQLQuery(
// GraphQL query goes here:
mutation updatePayTypeMaster( $id: Int! $pay_type: String $pay_type_code: String $department: String $store_id: String ) { updateDmsPhysicalRwPayTypeMaster( input: { patch: { payType: $pay_type payTypeCode: $pay_type_code department: $department storeId: $store_id } id: $id } ) { dmsPhysicalRwPayTypeMaster { id } } } ,
// GraphQL variables:
{

    id: 34,
    Pay_type: 'test',
    pay_type_code: 'CH',
    department: 'REPAIR',
    store_id: '34567'
},
// Additional props to add to `req` (e.g. `user: {session_id: '...'}`)
{},
// This function runs all your test assertions:
async (json) => {
  
  expect(json.errors).toBeFalsy();
  expect(json.data).toBeTruthy();
  expect(json.data.allDmsPhysicalRoVwStoreMasters.totalCount).toBe(2);
  // expect(json.data.currentUser).toMatchObject({
  //     id: user.id,
  // });
}

);
});
@benjie

from starter.

benjie avatar benjie commented on May 20, 2024

The operation is not valid, because the field UpdateDmsPhysicalRwTblServiceAdvisorInput.nodeId (which was expecting an ID!) was not provided. You've passed id: $id whereas the mutation is expecting nodeId: ...; if you copy it into GraphiQL as I've instructed then it will show you where the error is. You're using the wrong mutation; you want something like updateDmsPhysicalRwPayTypeMasterById - have a look in GraphiQL to determine which mutation you need for the inputs you have available.

from starter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.