Questions tagged [relaymodern]

143 questions
0
votes
1 answer

Relay Moder - Pagination

I am already working on Pagination. I used PaginationContainer for that. It work’s but no way what I am looking for. I got button next which call props.relay.loadMore(2) function. So when I click on this button it will call query and add me 2 more…
Grund
  • 269
  • 1
  • 2
  • 11
0
votes
1 answer

What is the proper way to get data out of Relay Modern's internal store?

We are currently exploring some of the undocumented apis in Relay Modern, and so far the best way we have found to grab data out of the Relay Store for use in the application is to call environment.lookup with a selector derived from a graphql…
Brad Decker
  • 686
  • 7
  • 17
0
votes
0 answers

Inject variable in Relay modern fragmentContainer

I'm trying to inject a postId variable into a fragmentContainer. I've started the project with the with-relay-modern example. The variable $postId doesn't inject properly, so I used defaultValue: "UG9zdDoy" in the meantime, but the goal is to get…
user6198643
0
votes
1 answer

relay-modern FragmentContainer outside QueryRenderer

Is it possible? Can we use FragmentContainer outside a QueryRenderer? What I want to achieve: I have a RefetchContainer with a SectionList. Every item inside each section is a FragmentContainer. When I select an item from a section, I want to open…
parohy
  • 1,562
  • 1
  • 18
  • 30
0
votes
1 answer

How to combine FragmentContainer with RefetchContainer in Relay modern

I'm migrating some Relay classis code to Relay modern. And now I'm having a hard time migrating a pagination implementation. I'm using a page and offset approach. Here's what I have now: Game.jsx: import React from 'react'; import ReactDOM from…
Smek
  • 860
  • 10
  • 29
0
votes
1 answer

Multiple Relay fragments in one React component?

This is example from the docs. The problem is, what if I also need some other data in my TodoItem component that is completely on a different location in the data graph and can't come through Todo->TodoItem chain. class TodoItem extends…
Ska
  • 5,481
  • 9
  • 47
  • 67
0
votes
0 answers

React Relay passing data from parent to this.props.children

I have a parent component that requests data from the root like so: export default createFragmentContainer(App, { viewer: graphql` fragment App_viewer on User { id email name } ` }) Because I'm using React Router, the…
jordancooperman
  • 1,555
  • 2
  • 17
  • 30
0
votes
1 answer

Relay not updating after doing subsequent mutations

Currently, we stumbled across a problem doing mutation in relay modern. We have a diary which contains many entries. Whenever user add a entry which day of diary doesn't exist, we also create a diary before create a entry. Everything works as…
0
votes
1 answer

Relay Modern - Subscription updater(connection handler) method (no documentation on this matter)

I am trying to perform a subscription for my query. So my suspicion is that the connection (from the ConnectionHandler) is not working. I cannot find any proper documentation on this one. My subscription looks like: const LinkSubscription =…
0
votes
1 answer

BabelPluginRelay: Expected plugin context to include "types", but got:[object Object] when upgrading from 1.1.0 to 1.4.1. Why?

I had a perfectly working relay modern app with 1.1.0 babel-plugin-relay + react-relay + react-compiler + graphql 0.10.x, react 15.5.x but since upgrading all of them to 1.4.1 and graphql to 0.11.7 and react to 16.0.0 I keep getting this error when…
codepreneur
  • 446
  • 6
  • 18
0
votes
2 answers

Relay subscriptions not working with react-native

I'm using Express Graphql server with react native and Relay. My device does connects to the subscription but it does not subscribe to it. Here's my index.js on the server const subscriptionServer = SubscriptionServer.create( { execute, …
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
3 answers

What is the reason that function is not passed to a Button

I'm aware of JavaScript's scopes but probably I don't understand them fully because this code doesn't work. This code uses React and Relay Modern frameworks. There are 2 buttons, first one inside queryRender which is passed into Relay Modern…
Pawel
  • 2,667
  • 15
  • 22
0
votes
1 answer

How to refresh an item in a list for Relay Modern

In Relay Modern, how do you refresh just an item in a list? I have a pagination list. Later in a code, I want to refresh just an item, not the entire list. How do I do that in Modern Relay?
Joon
  • 7,348
  • 5
  • 41
  • 64
0
votes
1 answer

after mutation relay modern connection handler is undefined

I'm doing a mutation of multiple items. But the connection handler in updater returns undefined. I'm dealing with the shopItems type, Here's the relevant schema type Mutation { shopItem(input: itemsInput): addedItems } type addedItems { …
Saud Punjwani
  • 343
  • 2
  • 12
1 2 3
9
10