Questions tagged [react-router-relay]

react-router-relay is a tool used for integrating the react-router library into a Relay.js environment. Use this tag when using the react-router-relay library in your project.

react-router-relay (not to be confused with react-router) is a tool used when integrating the react-router library into a Relay.js environment.

react-router-relay will automatically generate a combined Relay query config with all queries and parameters from the active React Router routes, then pass down the query results to each of the route components.

Useful links

react-router-relay on GitHub

react-router-relay on npm

Related tags

46 questions
1
vote
2 answers

Cannot read property 'after' of undefined in implementing react-relay

In my nodejs application here is my schema.js file import { GraphQLBoolean, GraphQLID, GraphQLInt, GraphQLList, GraphQLNonNull, GraphQLObjectType, GraphQLSchema, GraphQLString, } from 'graphql'; import { connectionArgs, …
ajooba
  • 110
  • 6
1
vote
1 answer

Is react-router-relay inconsistent with the Relay pattern?

I'm using react-router-relay in a project. The design seems off to me given that every component basically ends up with a fragment having the same name as the root query. Shouldn't each component be able to have uniquely named fragments of any…
1
vote
2 answers

Can't get userID route parameter to work on react-router-relay

I'm trying to learn React Relay and GraphQL using react-relay-router but can't get params in my routes to work. My difficulty is at the "/Maps/:userID" route. Here's my router: ReactDOM.render(
1
vote
1 answer

React relay+router does not collapse queries of nested routes

I read on the react-router-relay that: react-router-relay will automatically generate a combined Relay route with all queries and parameters from the active React Router routes, then pass down the query results to each of the route components.…
Stefano Masini
  • 442
  • 3
  • 11
1
vote
2 answers

Multiple react-router-relay routes using same Relay root query with different fragment fields

I am running into an issue where when requesting data within two adjacent react-router-relay route components using the same root query, the graphql server query in the second route component invalidates the data previously retrieved from the…
Nik
  • 1,263
  • 12
  • 14
0
votes
1 answer

'.' is not recognized as an internal or external command for relay full stack

I am trying to use relay full stack. https://github.com/lvarayut/relay-fullstack But I am getting an error like '.' is not recognized as an internal or external command, operable program or batch file Here is my package.json file { "name":…
Sanjeev Malagi
  • 371
  • 2
  • 5
  • 11
0
votes
1 answer

Graphene Django and react-router-relay

I'm having real trouble figuring out the way that Graphene Django should be used with react-router-relay. Let's say I can use the following GraphQL query fine via the GraphiQL console on my Django server: query { allThreads { edges { …
Matthew Johnston
  • 4,249
  • 2
  • 14
  • 26
0
votes
1 answer

Can I pull deeply-nested nodes from a Relay query result?

My goal is to combine multiple nested sibling arrays of edges from the same Relay fragment into one render call. Backend data is delivered via Relay containers (also using react-router-relay). I have a component hierarchy that displays multiple Tags…
Brandon
  • 6,354
  • 5
  • 39
  • 64
0
votes
1 answer

Single-Page App Sharing Relay Variables

I'm currently experimenting with a single page application implementation that consists of a Layout component and swapping numerous Page components nested inside. The Relay containers on the Layout and numerous Pages share variables (in this…
Lakeside
  • 35
  • 1
  • 4
0
votes
1 answer

Retrieving variables for a Relay query fragment from an external store

When writing a GraphQL query fragment as part of a RelayContainer, I've been struggling with how to set query variables in certain situations. The basics outlined in the documentation are simple enough. But given the static nature of these queries…
Alex
  • 787
  • 5
  • 20
0
votes
1 answer

How to fetch and display item by id using Relay container, react-router and GraphQL

I am having a really hard time trying to get my head around Relay routes, react-router params and building the queries and containers in general! I want to edit a Feature when the user clicks on a specific Feature in a FeatureList. It passes a…
0
votes
1 answer

Clearing cache for log out in Relay.js app

I have a Relay app and I want to clear cache for a component that displays after logging in. I tried passing a currentRelay.store into my Relay.Router and implementing a currentRelay.reset() which sets that store to a new Relay.Environment, then…
0
votes
1 answer

npm start but see error

I start npm but see error , i don't know fix. please help me "D:\PhpStorm 2016.1.2\bin\runnerw.exe" D:\nodejs\node.exe D:\nodejs\node_modules\npm\bin\npm-cli.js run-script start > pickuphub@0.3.0 start E:\phong.pham\Developer\phpDev\pickuphub.net >…
phong pham
  • 11
  • 5
0
votes
1 answer

server side rendering with react-router-relay and react-rails

My server side is rails and I'm using react-rails with server side rendering (prerender: true). Recently started using relay with react-router-relay but with that, server side rendering is no longer possible, as apparently fetching the data involves…
0
votes
1 answer

how to pass value to the root query in react-router-relay

Suppose that I have the following root query in a relay with react-router-relay project: export default { calc: () => Relay.QL`query queryType ($number: String) { auth (number: $number) }`, } Initial value of $number comes from server like a…
msin
  • 13
  • 1
  • 4