graphile / starter

Opinionated SaaS quick-start with pre-built user account and organization system for full-stack application development in React, Node.js, GraphQL and PostgreSQL. Powered by PostGraphile, TypeScript, Apollo Client, Graphile Worker, Graphile Migrate, GraphQL Code Generator, Ant Design and Next.js
https://graphile-starter.herokuapp.com
Other
1.74k stars 219 forks source link

Filter error in testing query #265

Closed libinvarkey closed 3 years ago

libinvarkey commented 3 years ago

When using filter in error got error [GraphQLError: Unknown argument "filter" on field "Query.dmsPhysicalRwGoalSetting".],

code:-- test("allDmsPhysicalRoVwStoreMasters", async () => { //const data = GetDashboardItemsData; await RunGraphQLQuery( // GraphQL query goes here: query getGoalSettingsByGroupName($group_name: String, $store_id: String) { dmsPhysicalRwGoalSetting(filter: { groupName: { equalTo: $group_name }, storeId: { equalTo: $store_id } }) { nodes { goalId goalName goalValue storeId } } } , // GraphQL variables: { group_name: "abc", store_id: "1234", }, // 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 commented 3 years ago

Perhaps you've not installed the filter plugin? Please follow the issue template; I will not tell you again.

libinvarkey commented 3 years ago

@benjie thanks