Git Product home page Git Product logo

relay-angular's Introduction

Hi there ๐Ÿ‘‹

I am an independent OSS developer and in my spare time I work in the creation of libraries that allow the management of offline applications in web and react-native contexts. I actively follow the GraphQL world with particular attention to Relay.

The main libraries I created are:

๐Ÿ”ญ Iโ€™m currently working on:

  • relay-hooks v4.0.0
  • react-relay-offline v3.0.0
  • relay-angular v1.0.0

๐Ÿ“ซ My social accounts:

relay-angular's People

Contributors

dependabot[bot] avatar morrys avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

ch1ffa

relay-angular's Issues

Testing using karma

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

Relay-angular-plugin does not read relay.config.js

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");

Bundle roundtrips without using fragmentRefs

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.

parameterised decorator's incompatible with Ivy

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.