Questions tagged [relayjs]

Relay is a JavaScript framework for building data-driven React applications

Declarative: Never again communicate with your data store using an imperative API. Simply declare your data requirements using GraphQL and let Relay figure out how and when to fetch your data.

Colocation: Queries live next to the views that rely on them, so you can easily reason about your app. Relay aggregates queries into efficient network requests to fetch only what you need.

Mutations: Relay lets you mutate data on the client and server using GraphQL mutations, and offers automatic data consistency, optimistic updates, and error handling.

Resources

Code: https://github.com/facebook/relay
Docs: https://facebook.github.io/relay/
Chat: https://reactiflux.slack.com/messages/relay/ (Get an invite here)

737 questions
0
votes
0 answers

Understanding fat queries and tree structures

I still have some troubles understanding the concept of fat queries in Relay, especially about the part of the intersection logic to determine which data to re-fetch. Up to now, I have build a simple hierarchical data structure with a UserType as…
tux21b
  • 90,183
  • 16
  • 117
  • 101
0
votes
3 answers

How do you move from stock Relay to Relay with a router?

I have a React/Relay app that is currently working that I would like to add routing to using react-router-relay. When I try the minimum possible conversion, see the code below, I get an incomprehensible error in the log: "Uncaught Error: Invariant…
OverclockedTim
  • 1,713
  • 2
  • 12
  • 22
0
votes
1 answer

How to debug relay-starter-kit ? (database.js, schema.js)

The relay-starter-kit uses babel-node to run the ES6 style JavaScript. I would like to debug the server side code like database.js and schema.js. I tried node.js remote debugging but wasn't able to stop in any of my break-points. I also tried…
Christine
  • 3,014
  • 2
  • 24
  • 34
0
votes
1 answer

Injecting custom network url not working relayjs

I am following this sample app : https://github.com/relayjs/relay-starter-kit Relay.injectNetworkLayer( new Relay.DefaultNetworkLayer('http://localhost:8080/graphql') ); with custom url i am getting following errors OPTIONS…
invariant
  • 8,758
  • 9
  • 47
  • 61
-1
votes
1 answer

NextJS: How do I statically render a page, but then update with user-specific information once rendered

I'm after some guidance on a particular data fetching use-case with NextJS static page rendering. We have a page that displays articles (imagine something like this page). The data is the same for everyone (and so would be a good candidate to render…
MDalt
  • 1,681
  • 2
  • 24
  • 46
-1
votes
1 answer

GraphQL/Relay - How to pass a mutation's input variable into a query on the mutation response?

Given a mutation like this (see how nextArticle needs an ID passing): mutation markArticleCompleteMutation( $input: markArticleCompleteInput! ) { markArticleComplete(input: $input) { user { nextArticle(excludeArticleId:…
MDalt
  • 1,681
  • 2
  • 24
  • 46
-1
votes
1 answer

Cannot get property because an index signature declaring the expected key / value type is missing in null or undefined [1]

I am testing PermissionDetail component which has graphql fragment, that is the data of node of PermissionTable component. I am getting a flow type error in this line when getting mock data from query const permissionDetail =…
Jagrati
  • 11,474
  • 9
  • 35
  • 56
-1
votes
1 answer

Arduino loop does not stop - only with smaller counters. Arduino Nano Every

I cannot explain to myself why this code works properly in some cases and in some not. Here is the situation: I am trying to switch a relay with the Arduino Nano. Therefore I took the "Blink" example as a guide. It should switch on for like 5…
Tom
  • 29
  • 5
-1
votes
1 answer

How to capture the response of a query in GraphQL Relay

I am new to relay, I have a query that delivers a response, which I can see in the network tab of the inspector, but what I dont understand is how to grab that response for use in my component. Could someone please explain that? My query is const…
IWI
  • 1,528
  • 4
  • 27
  • 47
-1
votes
1 answer

how to integrate routing(found-relay) in relay without its typings?

i want to create a web app in relay using found-relay routing. I looked at this sample in relay modern which i think is great: sample but i try tried to look at found-relay and I can't find @types/found-relay unlike @types/react-router-dom? i am…
gpbaculio
  • 5,693
  • 13
  • 60
  • 102
-1
votes
1 answer

react-select error: str.replace is not a function error

I am trying to implement react-select in my project. My code is here: https://gist.github.com/BikalNepal/9172b3161abfa545cc5748055c6584c6 The data for search is being fetched using graphql and relay from a backend nodejs server, when I type into…
Bikal Nepal
  • 477
  • 1
  • 10
  • 26
-1
votes
1 answer

Relay re-fetching failed... error Relay was unable to reconcile edges on a connection

Help, plz! Perhaps someone already faced with my problem.... When re-fetch data with the updated variables -- using relay.setVariables() -- I get the error "Relay was unable to reconcile edges on a connection. This most likely occurred while trying…
-1
votes
1 answer

React relay tutorial undefined error

Why does: Uncaught TypeError: undefined is not a function show after completing and subsequently testing the tutorial?
obimod
  • 797
  • 10
  • 26
-2
votes
1 answer

Why 'handlePost' is not defined?

Try to add a handler to my Node, React button component, to insert a row in DB, but I got an error, though I am just copying code from an example tutorial. What is wrong?
János
  • 32,867
  • 38
  • 193
  • 353
-2
votes
1 answer

How to update root node such as viewer?

I'm trying to update the viewer field of the root node when user logs in with a UpdateUserSessionMutation. However since viewer starts as null and doesn't have an id initially, I'm not able to update the viewer field with the MutaitonPayload using…
Oguz Bilgic
  • 3,392
  • 5
  • 36
  • 59
1 2 3
49
50