Questions tagged [relay]

Relay is a JavaScript framework for providing a data layer and client-server communication to web applications using the React view layer.

Relay is a JavaScript framework for providing a data layer and client-server communication to web applications using the React view layer.

656 questions
6
votes
0 answers

Relay.js - Not receiving props, only __dataId__

So I'm trying to figure out Relay.js. I conjured simple app that basically imitates example on Relay's website. However although I've managed to get rid of errors in both consoles (node and chrome), my component doesn't receive fragments I specified…
Albert Nemec
  • 781
  • 2
  • 9
  • 13
6
votes
1 answer

How to synchronize Redux and Relay?

The situation I have an onboarding scenario where the user goes through a step-by-step onboarding. I want to manage the client side state of the user's progress with Redux. The synchronization between the server and the client is already implemented…
marktani
  • 7,578
  • 6
  • 37
  • 60
5
votes
1 answer

How do I use react router with relay?

I am struggling with react-router and relay integration. As of now, I stick to this example It uses the useLazyLoadQuery hook, and although everything seems to work just fine, I also see another way of doing this: usePreloadedQuery. The docs say…
5
votes
0 answers

Cannot update a component while rendering a different component when using QueryRender and React context

I am having an issues I can't seem to work out. When I use the QueryRenderer HOC component from relay and render it as children via a react context I get the following error: Cannot update a component (`Customers`) while rendering a different…
Charklewis
  • 4,427
  • 4
  • 31
  • 69
5
votes
1 answer

How can I share the same form for creating and updating an object in relay-modern (experimental)?

I am new to relay and I'm attempting to use relay modern experimental in concurrent mode. I have been able to load nodes, edges, etc just fine with Suspense and ErrorBoundary. I'm now working on a form for create and update of an object. I can't…
Duane
  • 273
  • 1
  • 11
5
votes
1 answer

In Relay.js, what is the `Client Mutation Identifier`?

In the relay documentation here, it says that: Relay uses a common pattern for mutations, where there are root fields on the mutation type with a single argument, input, and where the input and output both contain a client mutation identifier used…
davidx1
  • 3,525
  • 9
  • 38
  • 65
5
votes
1 answer

React Relay Uncaught RelayNetwork: No data returned for operation

I am seeing this error: Uncaught RelayNetwork: No data returned for operation in my application. I am using Relay Modern with "relay-runtime": "1.7.0" The question i am having is how to catch these errors. I feel no matter where i place my…
Divide by Zero
  • 1,343
  • 1
  • 14
  • 37
5
votes
1 answer

Setting up multiple network layers in Relay Modern

I am using a react-native app with relay modern. Currently our app's fetchQuery implementation, just does a fetch on the network (like in https://facebook.github.io/relay/docs/en/network-layer.html), Although there is a possibility of another…
jay shah
  • 903
  • 6
  • 21
5
votes
1 answer

Relay based Pagination in Java for Java-GraphQL server

I have implemented a java based GraphQL server using the GraphQL-Java-tools. Now I need to implement the Relay based pagination with the Java-GraphQL server that I have. I couldn't find anything helpful out there. Can anyone please help me in…
gkarthiks
  • 471
  • 6
  • 17
5
votes
0 answers

Relay modern caching example

I would like to enable caching in my react native application. I am using GraphQL with Relay modern. I found out that caching is not enabled by default in relay modern, but they have exposed RelayQueryResponseCache from relay-runtime, which we can…
parohy
  • 2,070
  • 2
  • 22
  • 38
5
votes
1 answer

Given GraphQL schema, is it possible to do client-side pre-mutation validation?

I have a Relay app and it shares a GraphQL schema with the server. For every mutation, it queries the server, and the server returns back with the error message about what field value is invalid. But given that schema is present on the client, too,…
rishat
  • 8,206
  • 4
  • 44
  • 69
5
votes
1 answer

Unable to fetch list in react relay

I am following schema same as mentioned here I want to fetch all users so I updated my schema like this var Root = new GraphQLObjectType({ name: 'Root', fields: () => ({ user: { type: userType, resolve: (rootValue, _) => { …
akshay
  • 1,151
  • 1
  • 19
  • 31
5
votes
1 answer

How Query Composition With Unions works with parent children tree passed via props in Om Next

I have two components A and B. I want to switch between these two components on the page. (defui A) (defui B) One solution is to use a parent component C: (defui C (render (let [{:keys [activeView]} props] (if (= activeView 'A') …
eguneys
  • 6,028
  • 7
  • 31
  • 63
4
votes
1 answer

Correct value for `startCursor` and `endCursor` in `PageInfo` when there are 0 items/edges? Is the Relay pagination spec incorrect?

The Relay pagination specification says the following about PageInfo: It must also contain fields startCursor and endCursor, both of which return non-null opaque strings. [...] startCursor and endCursor must be the cursors corresponding to the…
Lukas Kalbertodt
  • 79,749
  • 26
  • 255
  • 305
4
votes
1 answer

relay-compiler 12 + graphql 16 = Invalid AST Node

I have a react / express / postgraphile / relay project and recently upgraded all my packages to the latest to see what would break. I got through most bugs except this relay-compiler error Invalid AST Node which seems to be related to graphql 16. I…
Kirk Ross
  • 6,413
  • 13
  • 61
  • 104
1 2
3
43 44