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
3
votes
1 answer

Relay Modern, Load More is not working, hasMore() keep returning false

i'm currently working on RN using expo, the list just initially fine, until i follow the loadMore tutorial, load more is not working, the hasMore() function returning false, whereas my hasNextPage is true my home screen has a record list inside it…
Bondan Herumurti
  • 928
  • 1
  • 6
  • 12
3
votes
1 answer

What are the differences between Apollo Client and Relay?

I have just been introduced to GraphQL and am deciding between the two frameworks (Apollo and Relay) for implementing my front end React web app. I'm aware that Relay is built by Facebook, while Apollo is by Meteor. Has anyone tried both and how has…
Yangshun Tay
  • 49,270
  • 33
  • 114
  • 141
3
votes
1 answer

GraphQL + Relay: How can I perform authorization for refetching?

I am working on a GraphQL server built using Express and attempting to support Relay. For a regular GraphQL query, I can handle authorization in the resolve function. E.g.: var queryType = new GraphQLObjectType({ name: 'RootQueryType', …
jwde
  • 642
  • 4
  • 13
3
votes
1 answer

GraphQL - 'either / or' for multiple required input fields

I'm working on a Relay-compliant GraphQL schema and would like to include a mutation that takes an input object that requires either one argument (the ID of a record) or two other arguments (a record number and a catalog number for the record). I'm…
Alec
  • 1,399
  • 4
  • 15
  • 27
3
votes
2 answers

How to update Relay store without pushing to server

I have a form in my React/Relay app that I am using to modify some fields. I don't want to send a server update every time a new letter is typed into an input. How can I use Relay to support the application state without always pushing to the…
Matthew Herbst
  • 29,477
  • 23
  • 85
  • 128
3
votes
0 answers

How to query multiple node(id: $id) efficiently in one round trip in Relay?

I have multiple node ids that I want to query with Relay. What is the best way to fetch nodes data in one round trip and cached properly based on ids? each node is of the same type and will have the same data structure and query like the…
Joon
  • 9,346
  • 8
  • 48
  • 75
3
votes
0 answers

TypeError: Cannot read property 'Symbol' of undefined in react-data-grid.ui-plugins.js:18258

I am using the 'Rubix-Reactjs Powered Admin Template' for development(https://wrapbootstrap.com/theme/rubix-reactjs-powered-admin-template-WB09498FH). I installed the 'react-data-grid' adazzle plugin (https://github.com/adazzle/react-data-grid)…
3
votes
1 answer

Plugin 0 specified in 'foreign' provided an invalid property of '_c'

Getting above error with below configuration, how should I make it working? .babelrc: { "passPerPreset": true, "presets": [ {"plugins": ["./build/babelRelayPlugin"]}, "react", "es2015", "stage-0" ] } package.json: { …
Trunks
  • 33
  • 4
3
votes
0 answers

Different ways of recursive data fetching with Relay? Which one is better and other questions

Recently I've made a component for recursive classifier with Relay. I made it with two ways. One of which did not work and the second worked. From the end-user side they both look the same with the same functionality. In short the task is pretty…
Grigory
  • 992
  • 2
  • 18
  • 34
3
votes
1 answer

Broken autobinding in arrow function for referenced node modules when using react-native with react-relay

I'm using react-native and react-relay, therefore I've the following .babelrc file: { "sourceMaps": "both", "presets": [ "./plugins/babelRelayPlugin", "react-native" ], "passPerPreset": true } Adding a dependency which uses arrow…
3
votes
2 answers

React / Relay server side rendering and SEO friendly application

What is the most reliable way/approach to build React/Relay/GraphQL SEO friendly application with server side rendering ?
Y13
  • 31
  • 1
3
votes
1 answer

Relay was unable to reconcile edges on a connection

I am trying to implement pagination using relay in application. Displaying data in react-bootstrap table and pagination to navigate pages. First time when I hit page it loads first page data (executes root Query). On click event of on pagination (1,…
Buddy566
  • 75
  • 1
  • 10
3
votes
1 answer

Nested fragment data always the same in Relay

I'm new to Relay and am having an issue with nested data on a fragment. The following query returns the correct data when I test in it graphiql so I am confident my schema is correct. { viewer { customers { name billing_address { …
3
votes
2 answers

Graphql & Relay production cases

I'm thinking about using graphql/relay solution for my app, and I wonder which companies are using graphql/relay in production (except facebook). Can you list here companies that uses it and their case studies. Thanks.
Shai M.
  • 1,284
  • 4
  • 17
  • 30
3
votes
1 answer

How to set a Relay variable as an enum value?

Example fragment: fragments: { viewer: () => Relay.QL` fragment on Viewer { people(first: $limit orderBy: $orderBy) { count edges { node { id, ${PersonListItem.getFragment('person')}, …
Alex
  • 1,689
  • 18
  • 27