Comments (5)
@aperkaz Thanks for example 🎉
from graphql-lodash.
Hi @aperkaz,
Glad that you like our project 🎉
I am trying to mock graphql-lodash with Jest, in order to test components decorated with it.
Not sure that I understand your use case probably because I never wrote any test for React components 😞 Can you please provide more details?
Maybe you can provide a simplified version of your test that reproduces issue?
from graphql-lodash.
Hello @IvanGoncharov,
Thanks for the reply 🙂 . In my case, it seems that the issues when mocking graphql-lodash where side effects from the wrong mock of other modules 😬
from graphql-lodash.
where side effects from the wrong mock of other modules
@aperkaz Phew 😇
BTW. Do you use this package in production?
Would be great to see a few examples of your queries if possible?
It will help us to understand where to go with future versions.
from graphql-lodash.
@IvanGoncharov right now we are using it to transform the results of graphQL queries to a CMS (Contentful) to the right props that our React components require.
Using graphql-lodash
allows to easily change the props to what the stateless components are expecting, and also easy to extend if the props in components are chagned/renamed.
Below I attach an example query:
query getPost($id: ID!) {
post(id: $id) {
photo: postPhoto {
alt: title
src: url
}
headline
subtitle: postPerex
content
author: postAuthor @_(get: "name") {
name
}
date
}
}
from graphql-lodash.
Related Issues (20)
- missing functionality to flatten array HOT 5
- Add more examples? HOT 1
- Using graphql-lodash with Apollo mutation refetch queries ? HOT 4
- Server side usage - seems to be working well :-) HOT 5
- Saved Queries examples are broken
- The Headers buttons don't do anything
- Is it possible to reverse the transformation process? HOT 3
- Is it really possible to flatten the data with some duplication?
- Include in grapiql tool? HOT 1
- Change demo to move away from anachronistic gender terminology HOT 2
- react-apollo is discontinued HOT 2
- @_(get: "x") will remove all properties on the current object HOT 2
- Demo page doesn't work - Failed to fetch
- Usage with "GraphQL Code Generator" HOT 6
- assertValidName.js:21 Uncaught ReferenceError: process is not defined HOT 2
- Is this being maintained? HOT 3
- express-graphql / graphqlHTTP implementation example
- do not works with array of strings HOT 2
- enable type casting HOT 16
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-lodash.