product-ride / hql-tag Goto Github PK
View Code? Open in Web Editor NEWA Hasura utility library, which is a wrapper on graphql-tag. This library helps in writing clean queries for Hasura GraphQL backend.
A Hasura utility library, which is a wrapper on graphql-tag. This library helps in writing clean queries for Hasura GraphQL backend.
Admittedly Lazily I have not tried it out yet - but our queries do look ugly on the front-end ending up looking like this...I would love to have them cleaned up and get rid of the ugly loc.source.body
access to the query string line everywhere.
const query = {
query: getCompanyByMatchQuery.loc.source.body,
variables: {
where: {
company_users: {
user_id: {
_eq: currentUser.id,
},
},
},
},
};
const { data, error } = useSWR(JSON.stringify(query), () => fetcher(query));
This project looks brilliant!
I would love to see a PR over to add it on awesome-hasura
Hey there. I love this library thanks.
I was wondering if there's a way to do nested arguments? I've messed around a bit and don't think you can unless I'm mistaken.
For example:
where: { active: { _eq: true }, shopBilling: { active: { _eq: true } } }
Of course this works:
active_eq: true
In this case though shopBilling is a related table with an object relationship, so I was hoping you could do this:
shopBilling { active_eq: true }
or shopBilling.active_eq: true
but to no avail.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.