Questions tagged [relaymodern]

145 questions
1
vote
1 answer

How to decrease request numbers with GraphQL mutations?

I want to decrease number of requests to graphql server. I have objects in an array like [{name: "gokhan", age: 20}, ...]; I use graphql a mutation to add every item of an array. If The array has 50 items, I need to send 50 requests to add all…
1
vote
1 answer

Apollo Link data mutation

I'm trying to mutate the data within an apollo-link handler for an entire application: I want to remove all edges/nodes as to simplify the handling of the data within my application. const consoleLink = new ApolloLink((operation, forward) => { …
paweloque
  • 18,466
  • 26
  • 80
  • 136
1
vote
0 answers

Can I use the relay updater configs for updating the simple graphQL list?

I'm using the latest version of relay (1.6.0) in my project to handle fetching and updating data between client and server. I have a list of books and I get this list as a simple qraphQL list (not a edge/node list) from server. This is my query for…
Vahid Boreiri
  • 3,418
  • 1
  • 19
  • 34
1
vote
2 answers

How to force a reload of ReactJS Relay Modern data (force fetch)?

Consider the following ReactJS component with Relay Modern: import React, { Component } from "react"; import PropTypes from "prop-types"; import { graphql } from "react-relay"; import { QueryRenderer } from "react-relay"; import environment from…
Mendes
  • 17,489
  • 35
  • 150
  • 263
1
vote
2 answers

File uploading with Relay Modern & GraphQL

So I've been on this for two days and am not savvy enough in Java to fully realize an approach to solving this issue. On the client-side I've found some excellent user documentation and believe I have the proper pieces in order but when it comes to…
1
vote
0 answers

Is there a way to clear Relay Modern Environment

Based on this: https://github.com/facebook/relay/blob/e5e07c3f12e5de1be584325498b94ed91a2580ec/docs/Modern-RelayEnvironment.md, is there a way to clear Relay's Environment?
1
vote
1 answer

Relay Modern with Redux integration

I have reached the case where i have to handle with the client state between react components meaning that i need to pass data from child component to parent(found workaround for neighbouring components). Do you think Redux implementation with…
1
vote
2 answers

Relay-Modern FragmentContainer data not populated

I'm using Relay Modern to try to load data into a FragmentContainer. I'm using the familiar Container (Smart) / Presenter (Dumb) pattern and the data is not being passed into my child Container as expected. However, if I use Relay's @relay(mask:…
Bibs
  • 995
  • 1
  • 8
  • 17
1
vote
1 answer

relay modern run RefetchContainer only manually

I still don't have much experience with relay modern and am trying to implement a search. For this I use a "RefetchContainer": export default createRefetchContainer( SearchComponent, { base: graphql` fragment SearchComponent_base…
RHauck
  • 271
  • 3
  • 8
1
vote
0 answers

Relay Modern Compiler Skips Generating File for Query Fragment

I'm building a simple news aggregator with React/Relay and I'm having issues with Relay Modern. Whenever I run the compiler it generates a FeatureRootQuery.graphql.js file. However, it doesn't generate a FeatureRow_viewer.graphql.js file for the…
lgants
  • 3,665
  • 3
  • 22
  • 33
1
vote
1 answer

How to Setup Local Store with Static Data in Relay Modern

I'm building a React app that fetches data from a server and also passes static data to various components based on a user's selection from a dropdown menu. I'd like to use Relay Modern, but I've been unable to find anything in the docs about…
lgants
  • 3,665
  • 3
  • 22
  • 33
1
vote
2 answers

ReactJS Relay Modern: which router to choose?

I'm building a large SaaS CRUD application using ReactJs. There is a classic navigation need for the whole application, something like the following pattern for every object: Item list -> Item detail -> Item edit/delete |------> Item create For…
Mendes
  • 17,489
  • 35
  • 150
  • 263
1
vote
0 answers

Null response in query for Relay Modern interogation on GraphQL

Maybe someone who has managed to pass this step is willing to provide some indications. I have a schema, a resolver, i request the query and i have a null response. Please can you help on topic? module.exports = { Query: { allLinks: async…
1
vote
1 answer

Variable is not in scope error when relay-compiling Relay Modern code

I have the following simple Relay Modern code: import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { QueryRenderer, graphql } from 'react-relay' import environment from '../../../../../environment' const…
Mendes
  • 17,489
  • 35
  • 150
  • 263
1
vote
1 answer

Relay QueryRenderer fragmentContainer passed props different from server response because id conflict

I'm having this weird issue, basically: graphql request made from QueryRenderer Response comes back from the server contains data (inspected from Network tab in dev tools) props populated in QueryRenderer render({ error, props }) function the props…
andiwin
  • 1,552
  • 3
  • 14
  • 27