Questions tagged [relay]

Relay is a JavaScript framework for providing a data layer and client-server communication to web applications using the React view layer.

Relay is a JavaScript framework for providing a data layer and client-server communication to web applications using the React view layer.

656 questions
3
votes
1 answer

How to pass down props without duplicating fragments

I have parent component that ends up with nested fragments looking like this: query MyAppQuery( $id $a $b $c ) { viewer { ...App_viewer ...ComponentA_viewer @include(if: $a) ...ComponentB_viewer @include(if:…
Batman
  • 5,563
  • 18
  • 79
  • 155
3
votes
1 answer

How can I have multiple sibling instances of the same top level fragment container?

I am following this guide: https://relay.dev/docs/en/quick-start-guide#composing-fragments I am trying to create a higher level fragment container that queries data from the RootQuery: export const FormInstanceListContainer: FunctionComponent
Hubro
  • 56,214
  • 69
  • 228
  • 381
3
votes
0 answers

How to find an item's cursor in a GraphQL Relay connection?

I'm working on a GraphQL API and am using Relay style cursor navigation. I have come across an issue that I can't seem to find anyone else with, which is strange as it seems to be a common UI pattern. That is if you fetch your item from the list you…
George Reith
  • 13,132
  • 18
  • 79
  • 148
3
votes
0 answers

how to use relay+nextjs+react-relay-network-modern-ssr?

What is the right time to do hydration? What is the right time to call API? I am using useLazyLoadQuery hook, seems the getInitialProps method is not the right choice. I have tried the the example from nextjs, it is not usefull for me. In my…
Vidy Videni
  • 1,897
  • 3
  • 15
  • 23
3
votes
1 answer

Authentication and Authorization with Django GraphQL JWT and Graphene Relay

I would like to ask how I can do authentication and query tags limited to a specific user (owner) using Graphen Relay and Django JWT. Here is my Model: class Tag(models.Model): """Tag to be used for a objective""" name =…
ZeroX
  • 31
  • 3
3
votes
1 answer

Simple Webrtc relay bridge Server in C#

I have a fully working peerTopeer (P1, P2) webRTC. To handle peerTopeer failures, I am trying for a simple exchange of bytes via a server in c# between P1 and P2 on a windows machine, as I don't want to develop a turn server by specs. I have also…
Guru_07
  • 362
  • 3
  • 15
3
votes
0 answers

error trying to load the config "relay" for the macro imported from "babel-plugin-relay/macro"

We are trying to upgrade our react project to latest packages including relay (7.0.0). Our application builds and works but we are getting this error message in the console (during build) on every file where we import graphql from…
Scott
  • 485
  • 8
  • 21
3
votes
0 answers

Relay: When refetch container is called clears different fragment container

I have two containers on the Query level like so: query home_Query { ...AppQuery ...RefetchQuery } The refetch() gets called when the component is mounted, and it triggers a refresh on the AppQuery. However, when that rerender happens,…
jouerai
  • 135
  • 9
3
votes
1 answer

UI not reflecting changes after mutation

I am using a QueryRenderer to populate an edit form in my application. The data is also being displayed in additional DOM elements throughout the page. I am then saving the values back on form submit through a mutation. Everything works great,…
Sloth Armstrong
  • 1,066
  • 2
  • 19
  • 39
3
votes
1 answer

Fail2ban not using sender in jail.conf

I am trying to change the sender of Fail2ban email notifications to a separate domain. Inside /etc/fail2ban/jail.local I specify: sender = no-reply@externaldomain.com mta = mail However, when I restart the service, emails are still being sent from…
JoaMika
  • 1,727
  • 6
  • 32
  • 61
3
votes
1 answer

How to pass a variable data to createFragementContainer

I´m using Relay Modern to build my component and I want to pass a varible to the fragment so that it can be used as a GraphQL argument on my query. Here is the code I´m using: class Test extends Component { static propTypes = { userId:…
Mendes
  • 17,489
  • 35
  • 150
  • 263
3
votes
2 answers

How to unsubscribe in Relay Modern

How do you unsubscribe from a subscription in Relay Modern? I have followed the subscription tutorial on How to GraphQL React + Relay but it has no mention on how you unsubscribe either does the Relay Modern website. Any help would be…
Andrew Hunt
  • 554
  • 1
  • 4
  • 11
3
votes
1 answer

How add react-relay component to the storybook?

I am trying create a storybook for my react-realy app, but i don't know how to set mockup data for that component. For simple a component it is ok, because i can use dummy UI component vs Container approach, but i can't use this for nested relay…
Grund
  • 309
  • 1
  • 2
  • 12
3
votes
1 answer

relay fragment spread not working

I'm in the learning process of relay and facing a very wired issue. Relay is not returning the data from network response if I use fragment spread operator (actual data is returning from graphql, confirmed from the network tab). But if I define the…
Provash
  • 1,892
  • 3
  • 20
  • 28
3
votes
0 answers

relay refetch doesn't show the result

I'm trying to create a live search-result component(lazy load one). It works perfectly for the first time but refetch doesn't update the data. I see the request and respoonse in Network tab! so it does get the data, but it doesn't supply it to the…