morrys / relay-angular Goto Github PK
View Code? Open in Web Editor NEWRelay & Relay Offline for Angular
Home Page: https://morrys.github.io/relay-angular/docs/relay-angular
License: MIT License
Relay & Relay Offline for Angular
Home Page: https://morrys.github.io/relay-angular/docs/relay-angular
License: MIT License
In this fork (https://github.com/waldogit/relay-angular-config) of your example I added a 'combine' action that shows the 'Yours' todos together with a selected todo of 'Me'.
However: pressing the 'Combine' leads to 2 roundtrips, one for the combinedQuery and one for the todoQueryQuery. How can they be bundled into a single roundtrip?
In this case, I could have used a fragmentRef to solve that issue, but suppose - as a thought experiment - I don't have that fragmentRef, I only know the todo.id ? Afaik, I need to use a fragment with argument definitions for this, but although relay provides that, it is not available through relay-angular.
check compatibility with wora/relay-offline and create the sample project
I managed to successfully use of relay-angular
in my angular project according to instructions, but when I tried to run my test using ng test
, no tests was executed and I got error message, I guess it happened because builder had not been set like in the others commands.
I figured out the missing configuration, I needed to set the test builder in my angular.json file as ngx-build-plus:karma
and fix my package.json test command as ng test --plugin relay-angular-plugin
and that's it, now I can run my tests usin npm run test
.
I hope it could be useful for somebody, I think that this project is awesome and could be very popular with the enough documentation
errors when doing ng update @angular/cli
:
Error: error TS100: relay-angular/lib/RelayProvider.ts(6,22): Error during template compile of 'RelayProvider'
Only initialized variables and constants can be referenced in decorators because the value of this variable is needed by the template compiler.
error TS100: relay-angular/lib/Query.ts(1,22): Error during template compile of 'Query'
Only initialized variables and constants can be referenced in decorators because the value of this variable is needed by the template compiler.
error TS100: relay-angular/lib/Fragment.ts(1,22): Error during template compile of 'Fragment'
Only initialized variables and constants can be referenced in decorators because the value of this variable is needed by the template compiler.
The decorator setup has a nice DX, but appears to be fundamentally misaligned with Angular's roadmap
Relay-angular-plugin does not read relay.config.js. One of the consequences is that angular-relay does not properly handle project setups where the angular server uses parent node_modules (like when using Nx)
For devs aspiring to use relay-angular, a quick fix is to change the index.js in the installed node_modules from
line 10: RelayConfig = eval('require')('relay-config');
into
line 10: RelayConfig = require("/absolute/path/to/relay.config.js");
This issue is linked to relay-tools/relay-hooks#126.
Even if it is react, many of the logic can be recovered in order to guarantee greater stability.
When changing the user and creating a new todo, the list does not seem to update correctly
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.