Questions tagged [react-relay]

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

91 questions
0
votes
2 answers

RelayObservable: Unhandled Error TypeError: Cannot read property 'subscribe' of undefined in React and Relay

I have followed the subscription tutorial on How to GraphQL React + Relay (https://relay.dev/docs/en/subscriptions) but still not working. I'm using Relay Modern in my app and have successfully integrated query but not working the…
Raghav Rangani
  • 843
  • 7
  • 23
0
votes
1 answer

RelayModernGraphQLTag: Expected a request, got:

When using the new react-relay expirimental I got this error: invariant.js:40 Uncaught Invariant Violation: RelayModernGraphQLTag: Expected a request, got…
Richard Lindhout
  • 2,038
  • 2
  • 23
  • 38
0
votes
1 answer

When making a node query, will react-relay check if that node is in the store before making a network request?

If I create a graphql server that has the following schema: type Node { id: ID! } type User implements Node { id: ID! groups: [group!]! } type Group implements Node { id: ID! name: String! } type Query { me: User! node(id: ID!):…
0
votes
0 answers

update connection using relay subscription updater

I have a relay subscription setup in which I am getting the data in the updater which looks like this https://gist.github.com/ydvsailendar/6b9569bbcbc269246e299eb5cce18a80#file-gistfile1-txt-L10 I want to update my connection for a query so that I…
0
votes
1 answer

How to create a viewer field for relay in django-graphene root schema?

How to create a viewer field for react-relay in graphene-django? This does not work like intended. I am using graphene-django v.2.2. Django 2.1. React-relay v1.7.0-rc.1. // landingpage.schema.py class CollectionNode(DjangoObjectType): class…
0
votes
0 answers

Relay: Query breaking with no sign of what is wrong

I've began to learn graphql (adding relay here), so i followed up the steps to have relay running, i created my first query: function fetchQuery(operation, variables) { return fetch("http://localhost:3000/graphql", { method: "POST", …
PlayMa256
  • 6,603
  • 2
  • 34
  • 54
0
votes
1 answer

Multiple pages using relay-modern-isomorphic

I followed this relay-modern-isomorphic-example tutorial : Link In that tutorial they have a single page with no routing , import express from 'express'; import graphQLHTTP from 'express-graphql'; import nunjucks from 'nunjucks'; import path…
Beckham_Vinoth
  • 701
  • 2
  • 13
  • 39
0
votes
1 answer

How to update state with Relay QueryRenderer props

I have a react component with a form for updating database records. Here's the thing: the data is loaded with React-Relay QueryRenderer component as follows: class Update extends Component { //constructor.. //some stuff render() { …
Joan Gil
  • 145
  • 3
  • 10
0
votes
1 answer

Rendering Relay Modern Fragments in React

I cant seem to get the "count" data to show up in the UI. I'm sure I'm missing something about using two fragments in the same container or rendering the edges array or async, maybe. All other data is showing except {this.props.link.votes.count}…
armand
  • 693
  • 9
  • 29
0
votes
1 answer

Relay Store Updater Not Working

Im trying to do an updater to a mutation and its not working well it says to me that the 'setValue is not a function', and when do a console.log on the newEvent and on relayEvent it returns to me the right data can somebody help me please! My…
0
votes
1 answer

schema.graphql vs. buildSchema()

Following the Relay Modern documentation, first I started off by using the buildSchema() function and placing my schema and rootValue in JavaScript file and use it whenever needed. Later I found out that relay-compiler needs a schema file either in…
Mahdi
  • 9,247
  • 9
  • 53
  • 74
0
votes
1 answer

Issue using Relay mutations with files

I have an issue using File Mutation with Relay. I am trying to create a mutation using getFiles() Relay.Store.commitUpdate( new AddOrderMutation({userId: userId, medications: OrderInputTypeMedication, …
MorcosS
  • 71
  • 1
  • 2
0
votes
0 answers

React-Relay older browser support (blank site)

I have a react-relay graphql app that works perfectly on new browsers, but on safari 5.1.10 (2013) it doesn't work. The site is just white. Same happens with older versions of chrome. The console gives: TypeError: 'undefined' is not a function…
user2038460
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
  • 978
  • 7
  • 23
-1
votes
1 answer

Relay - usePreloadedQuery hook is suspending rendering while mounting with enzyme

I get the below error while trying to unit test a component which uses usePreloadedQuery: Error: A React component suspended while rendering, but no fallback UI was specified. Add a component higher in the tree to provide a…
T J
  • 42,762
  • 13
  • 83
  • 138