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
2
votes
1 answer

Unable to run relay-compiler

I installed the relay for my react-native project following the steps on relay.dev. Running the compiler works fine when I have an empty schema file. Putting schema to the file starts throwing me this error: thread 'main' panicked at 'Expect…
2
votes
0 answers

Why does watchman gives timeout error when using it with react-relay?

I'm using WSL Ubuntu to run a react-relay project, but after installing watchman using brew and trying to run the app in watch mode, watchman gives me the following error(I have run the project using yarn start): Watchman error: The watchman server…
Marius
  • 37
  • 1
  • 4
2
votes
0 answers

Suspense in a FlatList

I am developing a React Native app with Relay. I was using a FlatList inside a ScrollView like this: ... I experienced issues with ondEndReached (it’s being called every…
2
votes
0 answers

enable relaying for a single user with sendmail

(bg: I have inherited this mess, I have a limited timeframe to fix, and changing out programs to something else is not an option at this time, I am not a sendmail expert but no one else has any experience with it) I have a domain that has MX records…
Monte
  • 21
  • 2
2
votes
0 answers

How to jump to a specific date in a cursor based relay pagination?

I’ve got a cursor base paginated relay connection which is ordered by a startDatetime timestamp. The query looks like this; query UnassignedShiftsQuery($first: Int, $cursor: String) { user { id unassignedShifts(first: $first, after: $cursor)…
james2m
  • 1,562
  • 12
  • 15
2
votes
2 answers

Set permissions on Graphene Relay Node and Connection fields

How can I require authentication/authorization on the tier Node field and allTiers Connection field query below? # schema.py class TierNode(DjangoObjectType): class Meta: model = Tier filter_fields = [] interfaces =…
atm
  • 1,684
  • 1
  • 22
  • 24
2
votes
0 answers

React relay auth middleware

I am trying to build a react app using relay following instructions from the react-relay step by step guide. In the guide the auth token is stored in the env file, and I am trying to retrieve my token from memory which is created when the user logs…
Varun
  • 31
  • 3
2
votes
0 answers

How to combine queries in Relay

I am new to using Relay and wondering how it is best to structure when a new query is required further down the DOM tree. Relay provides a great guide to writing queries, which suggests to have a very limited number of queries and to compose the…
Charklewis
  • 4,427
  • 4
  • 31
  • 69
2
votes
1 answer

How to update the store and UI in Relay using updater and optimisticUpdater?

When creating a record, an error appears in the console that: "Warning: A store update was detected within another store update. Please make sure new store updates aren't being executed within an updater function for a different update" The…
Kiten
  • 985
  • 2
  • 17
  • 35
2
votes
0 answers

With Graphene GraphQL, is it possible to cache the queryset used for Relay Connections (pagination)?

When using Graphene's Relay Connection field, it's very easy to paginate though a queryset. The client passes the arguments (first, after, before, last), then by returning a queryset the resolver paginates automatically. To me, a super powerful…
MDalt
  • 1,681
  • 2
  • 24
  • 46
2
votes
1 answer

Relay: Cannot read property 'fetchKey' of null

Im trying to use the new relay hooks but getting this error: import React, { Fragment, Suspense, useEffect } from 'react'; import Banner from './banner/Banner.react'; const { graphql, useQueryLoader, usePreloadedQuery } =…
Batman
  • 5,563
  • 18
  • 79
  • 155
2
votes
1 answer

What is the best practice for reusing components across fragments with React/Relay/Typescript?

I'm making a web app with React, Relay (experimental), and Typescript and I'm having some issues re-using components with similar data/props across different fragments. Let's say I have the following Relay query and main app component: const query =…
BadgerPriest
  • 723
  • 5
  • 11
2
votes
1 answer

TypeScript: Object is of type 'unknown'.ts(2571)

I'm using relay and graphQL in react Typescript to fetch list of users. While I'm passing the props from ViewerUserList.tsx to UserList.tsx. I'm getting this error: Object is of type 'unknown'.ts(2571) I've mentioned in below file where I'm getting…
mWaqar444
  • 21
  • 2
  • 2
2
votes
1 answer

Postgraphile -- makeExtendSchemaPlugin to add Viewer Type to schema -- Relay/Postgres

I'm new to Relay, GraphQL and Postgres and I'm trying to extend the auto-generated schema that PostGraphile creates to include the Viewer Type which is a staple of Relay. The example from their docs is probably enough for most people to work with…
Kirk Ross
  • 6,413
  • 13
  • 61
  • 104
2
votes
0 answers

Relay: How to use emitted types when receiving error -> Type '"%future added value"' is not assignable to type

Current project for this question is using react, react-relay, and typescript. When trying to reuse a type emitted by Relay for an enum, an error occurs: Type '"%future added value"' is not assignable to type I did a little research and found that…
Kraken
  • 5,043
  • 3
  • 25
  • 46