truecar / graphql-decorate Goto Github PK
View Code? Open in Web Editor NEWEasily decorate graphql-ruby types with a flexible API
Home Page: http://truecar.github.io/graphql-decorate
License: MIT License
Easily decorate graphql-ruby types with a flexible API
Home Page: http://truecar.github.io/graphql-decorate
License: MIT License
Delegation to connections wrapped with GraphQL::Decorate::Connection
is not working at the moment.
Decoration seems to happen before any pagination from the built in connections. This results in more objects being processed than are actually returned. The most likely cause is adding the decoration extension before all other extensions by pushing it to the beginning of the list.
I think with the last few commits this is now graphql ruby 2 compatible but the gemspec still restricts it to < 2. Can we lift that restriction now?
When a type implements an interface that eventually connects back to the same type in the graph, the type class given to the field may not contain the proper decorator attributes as that class has not been fully initialized. This was observed in a Rails 6 app with zeitwerk. In production environments where everything is loaded upfront this is not an issue.
A workaround for now is to specify the types for fields as strings instead of the class itself. field :rectangle, Rectangle
vs field :rectangle, 'Rectangle'
. You can also just ensure that the decorate_with
and decorator_metadata
methods are defined first in your type files.
Legacy
.to_graphqlobjects are deprecated and will be removed in GraphQL-Ruby 2.0. Remove
.to_graphql to use a class-based definition instead.
This gem no longer works :(
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.