Comments (8)
@BatuhanW
I don't understand why it was closed.
Do you mean that I should put a specific filter condition directly on the where argument in the gql tagged query?
If so, I can use any filter in hasura, but then how do I give it a dynamic value?
from refine.
Hello @tomoemon, thanks for the issue.
It seems like a good idea, but can you give me the GQL Query you want to generate so I can better understand the problem? Maybe we can make CrudFilter[] to support this.
from refine.
@alicanerdurmaz Thank you for your response!
For example, I want to execute the following query
Trying to get a list of categories that have at least one Posts with the string "test" in the title.
If Posts is related to another type, I may add more nested filters. This is often the case when I want to filter the items to be displayed with complex business logic.
query Categories {
categories(
where: {
posts_aggregate: {
count: {
predicate: { _gte: 1 },
filter: {
content: { _ilike: "%test%" }
}
}
}
}
) {
id
title
}
}
schema
type Posts {
id: ID!
title: String!
content: String!
categories: Categories!
}
type Categories {
id: ID!
title: String!
posts: [Posts!]!
posts_aggregate: posts_aggregate!
}
In my opinion, such a condition would be too complex to add to the CrudFilter. Writing complex filter conditions without type completion may also cause bugs.
from refine.
@tomoemon Thanks for the detailed explanation, we'll see what we can do.
from refine.
Hey @tomoemon I think you should use meta.gqlQuery
and meta.gqlMutation
fields. There you can pass your GraphQL queries created with graphql-tag
.
https://refine.dev/docs/data/packages/hasura/#usage-with-graphql-tag
from refine.
Hey @tomoemon, you are right. I think we can accept extra meta.gqlVariables
field in the hooks and pass it to the query variables inside data provider.
from refine.
We are open to contributions for this. This feature can be applied to following packages:
@refinedev/hasura
@refinedev/graphql
@refinedev/nestjs-query
from refine.
Hi @BatuhanW
I'd love to work on this feature, could you assign it to me? Thanks!
from refine.
Related Issues (20)
- [BUG] MUI Inferencer sets all fields to required HOT 1
- [BUG] Exmaple project cannot view HOT 3
- [BUG] nextjs 14 upgrade breaks imports HOT 4
- [FEAT]: Supabase Data Provider should filter array column by array HOT 5
- [FEAT] Support TypedDocumentNode for GraphQL data-provider HOT 6
- [BUG] Supabase token refresh not handled in Next.js example HOT 1
- [FEAT] Serving from a subdirectory HOT 2
- [DOC]: clarify rowCount retrieval and improve pagination examples
- [FEAT] i18n option when using cli to create project
- [BUG] After "npm create refine-app@latest" refine stucked in the build step forever HOT 2
- [BUG] Module '"@refinedev/antd"' has no exported member 'Create' ('List' and so on). HOT 1
- [BUG] npm create refine-app@latest fails with Found 58 errors in 12 files. HOT 2
- [BUG] Named export 'SyncOutlined' not found. HOT 16
- Date range table filter in Ant Design is broken HOT 11
- [BUG] Default GraphQL DataProvider GetListResponse from 'count' property not possible. HOT 2
- [FEAT] Default GraphQL DataProvider cannot function on deeper graphs HOT 2
- [BUG] Arrows directions in RTL (Right to Left) HOT 5
- [FEAT] Have an optional to reset from when close modal inside `useModalForm` HOT 4
- [FEAT] Ant Design's `<ThemedSiderV2>` change button position under mobile HOT 1
- Login is showing email not found for '[email protected]' being used in javascript mastery project HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from refine.