Comments (7)
Hey! Does using fragments just need documentation, or is it not working yet and there's work left to be done?
from graphql-hooks.
@altano Just docs required - it's just combining template strings, perhaps documenting some best practices.
from graphql-hooks.
If you link me to a code example of any kind I could maybe figure it out and help write a draft of the docs? No rush. Thanks!
from graphql-hooks.
And I certainly hope you don't actually mean it's just template string concatenation of strings like:
const userFragment = graphql`
name
profileUrl
`;
const query = graphql`
query Users {
edges {
node {
${userFragment}
}
}
}
This might be fine for a REALLY tiny site but it would obviously have all sorts of issues like debuggability. For example, if the query ended up being invalid you'd have no way of knowing where the problematic code actually was. And you'd have to pass all data from the entire response to all components.
But then again if I want more than that, perhaps I should shut up and use something more full featured like Relay?
from graphql-hooks.
Hey, is there any possible timeframe for the fragment documentation? I can't help because I have never used graphql-hooks. Actually I am considering migrating from relay to here, but I don't know if it is a good Idea, mainly because of how relay deals with fragments.
from graphql-hooks.
When this issue was created, fragments were probably not as common as they are now. I don't think we need docs for that as there is nothing special that this library is going to support fragments, they are simply part of GraphQL and hence available in any implementation. I'm going to close this issue.
from graphql-hooks.
Fair enough :)
from graphql-hooks.
Related Issues (20)
- client.setQueryData not updating the UI
- Npm install failing HOT 2
- How would one mock an error with partial response? HOT 4
- Release pending! HOT 1
- Release pending! HOT 1
- Subscription won't update on variables change
- Release pending! HOT 1
- Release pending!
- Release pending! HOT 1
- Release pending! HOT 1
- Release pending!
- Release pending!
- Support TypedDocumentNode HOT 6
- Type 'GraphQLClient' is not assignable to type 'Client' HOT 3
- Build failure
- Release pending!
- Correct release version for graphql-hooks
- all examples have the wrong version
- Release pending!
- chore(deps-dev): bump lerna from 7.4.2 to 8.1.2
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 graphql-hooks.