helpful-purple
helpful-purple•2y ago

selection sort issue

field "krseva_frequencies" not found in type: 'query_root': {"response":{"errors":[{"extensions":{"path":"$.selectionSet.krseva_frequencies","code":"validation-failed"},"message":"field "krseva_frequencies" not found in type: 'query_root'"}],"status":200,"headers":{"map":{"content-type":"application/json; charset=utf-8"}}},"request":{"query":"query ($limit: Int, $offset: Int, $order_by: [krseva_frequencies_order_by!], $where: krseva_frequencies_bool_exp) { krseva_frequencies (limit: $limit, offset: $offset, order_by: $order_by, where: $where) { name, id } krseva_frequencies_aggregate (where: $where) { aggregate { i am getting selection sort issue in all the resources of app.js
13 Replies
Omer
Omer•2y ago
Hey @rehan1 👋 , Which data provider are you using?
helpful-purple
helpful-purple•2y ago
graphql hasura we are not using strapi
Omer
Omer•2y ago
Can you reproduce the issue in our example? https://refine.dev/docs/examples/data-provider/hasura/ It seems you don't have a field named krseva_frequencies
helpful-purple
helpful-purple•2y ago
rror: field "orders" not found in type: 'query_root': {"response":{"errors":[{"extensions":{"path":"$.selectionSet.orders","code":"validation-failed"},"message":"field "orders" not found in type: 'query_root'"}],"status":200,"headers":{"map":{"content-type":"application/json; charset=utf-8"}}},"request":{"query":"query ($limit: Int, $offset: Int, $order_by: [orders_order_by!], $where: orders_bool_exp) { orders (limit: $limit, offset: $offset, order_by: $order_by, where: $where) { patient_name } orders_aggregate (where: $where) { aggregate { count } } }","variables":{"limit":10,"offset":0,"order_by":{},"where":{}}}} hapenning same for other resources to
Omer
Omer•2y ago
In this way, we cannot find the problem. Because the refine x Hasura example works as expected. Please provide an example where we can reproduce the error. You can get a fork from our example âš¡
helpful-purple
helpful-purple•2y ago
initially its throwing this error and then it is working fine is it expected previously it was not hapenning?
Omer
Omer•2y ago
This is not expected behavior. Please try to reproduce the error by creating a fork from our example
helpful-purple
helpful-purple•2y ago
when i click on configuration and thn its working .... initially its throwing an error
helpful-purple
helpful-purple•2y ago
please have a look at it const { selectProps: icdCodes } = useSelect<IcdCodes>({ resource: "krseva_icd_codes", optionLabel: "desc", optionValue: "desc", metaData: { fields: ["desc"], }, sort: [{ field: "desc", order: "asc" }], onSearch: (value) => [ { field: "desc", operator: "contains", value: ${value.toLowerCase()}%, }, ], }); const { selectProps: unitTypeSelectProps } = useSelect<IChiefComplaint>({ resource: "krseva_chief_complaints", optionLabel: "name", optionValue: "name", metaData: { fields: ["name"], }, sort: [{ field: "name", order: "asc" }], onSearch: (value) => [ { field: "name", operator: "contains", value: ${value.toLowerCase()}%, }, ], }); const { selectProps: symptomsProps } = useSelect<ISymptoms>({ resource: "krseva_symptoms", optionLabel: "name", optionValue: "name", metaData: { fields: ["name"], }, sort: [{ field: "name", order: "asc" }], onSearch: (value) => [ { field: "name", operator: "contains", value: ${value.toLowerCase()}%, }, ], }); const { selectProps: allergyProps } = useSelect<IAllergyTypes>({ resource: "krseva_enum_allergy_types", optionLabel: "comment", optionValue: "value", metaData: { fields: ["comment", "value"], }, sort: [{ field: "comment", order: "asc" }], }); const { selectProps: allergySeverityProps } = useSelect<ISeverityTypes>({ resource: "krseva_enum_allergy_severity", optionLabel: "comment", optionValue: "value", metaData: { fields: ["comment", "value"], }, sort: [{ field: "comment", order: "asc" }], });
Omer
Omer•2y ago
Can you share all codes of the page?
helpful-purple
helpful-purple•2y ago
helpful-purple
helpful-purple•2y ago
sure
Omer
Omer•2y ago
You get an error about resource "krseva_resource". Frankly, it is not possible for us to find this error. Please focus on the error message