Questions tagged [relaymodern]

145 questions
0
votes
1 answer

How to access relay environment outside fragment container

I have a component wrapped in createFragmentContainer(), which I think is how this component got 'relay' attached to it as a prop. Then somewhere in this component we have: commitMutationAsync(this.props.relay.environment, {something,…
Hua
  • 123
  • 8
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

Dynamic responses in relay modern mutations

I have an application that has multiple profiles for a given user. The user profile can be toggled from the application's header, so that toggle can happen from any page/route in the app. Because toggling can happen anywhere, I'm finding that I…
kpup
  • 1,781
  • 1
  • 10
  • 9
0
votes
1 answer

Relay Modern Cache Vs Store

Reading through the Relay docs I am confused about the concept of Cache mentioned in the network layer (https://facebook.github.io/relay/docs/en/network-layer.html) vs the Relay Store (https://facebook.github.io/relay/docs/en/relay-store.html). Are…
anon
  • 1,101
  • 3
  • 17
  • 33
0
votes
0 answers

Graphcool RELAY Subscription: subscribe to edges

subscription updateListSubscription { User(filter: {mutation_in: [CREATED]}) { mutation node { id name addressList{ edges { node { …
0
votes
1 answer

Flow type relay's createFragmentContainer

I'm pretty much out of ideas how to flow type relay's modern createFragmentContainer. I got this: import { type RelayContext } from 'react-relay' type Props = { relay: RelayContext } relay is prop added by container. Component is exported this…
BorisTB
  • 1,686
  • 1
  • 17
  • 26
0
votes
1 answer

Relay: how to get connection from store when used with order_by or other params?

I have a question regarding ConnectionHandler used in updater. I am reading the example and found import {ConnectionHandler} from 'relay-runtime'; // The `friends` connection record can be accessed with: const user = store.get(userID); const…
Junchao Gu
  • 1,815
  • 6
  • 27
  • 43
0
votes
1 answer

Importing react-relay-network-modern in cypress fails

The problem Hi folks, I'm using TypeScript 3.0.3 with cypress and trying to load the react-relay-network-modern module in my component. However, it always tells me that the module does not exist, although it is in my node_modules folder and defined…
lumio
  • 7,428
  • 4
  • 40
  • 56
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
1 answer

How can I catch RelayObervable Unhandled error when graphql errors are returned?

My backend is returning the following response: const errorMessage = { errors: [ { message: 'User is logged out', }, ], data: null, }; return res.status(200).json(errorMessage); My react-native app using relay is returning the…
James111
  • 15,378
  • 15
  • 78
  • 121
0
votes
0 answers

Why does Relay Modern send OPTIONS request

Is there a reason relay modern sends a OPTIONS request every so often? While using pagination you can see multiple of these requests in the Network tab.
amwill04
  • 1,330
  • 1
  • 11
  • 18
0
votes
1 answer

Dynamically create fields in graphql query?

So in the below example, I want to change stat to a variable, but it appears that variables are not allowed as field names? Is there a way to work around this? query={graphql` query PlayerQuery($condition:GamelogCondition!,…
0
votes
1 answer

Relay modern pagination without viewer

Hello i have done my server grapqhl api. Currently i'm stack on relay pagination in client. I searched many articles about that. And everywhere pagination done with viewer root query field. Which about it in docs said that field is unnecassary. In…
0
votes
2 answers

Why Relay Modern is making new requests, instead of using cache

I have a page where you can see the current Item and click "Next" to see the next one. Here is how this component looks like: class App extends Component { constructor(props) { super(props); this.state = { index: 0, ids:…
Oles Savluk
  • 4,315
  • 1
  • 26
  • 40
0
votes
1 answer

GraphQL: How to create a query with a curated list of parameters (a 2D array)

Specifically I feel like I am looking for the answer to the question asked here, but it turns out the title of the question isn't a perfect match for the actual question. What I am looking to do involves Relay, React, and GraphQL (I suppose I could…
Jimmay
  • 582
  • 5
  • 10