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

How to add root and viewer queries on an existing GraphQL Server for Relay support

I've been working with GraphQL for a while and was able to successfully launch a simple GraphQL Server. Now I'm trying to make it support Relay, my final goal, and I'm having trouble adding support for the root node query and the viewer query. I do…
Mendes
  • 17,489
  • 35
  • 150
  • 263
4
votes
2 answers

How to do file uploads with Relay Modern mutations?

I'm using react-relay/compat 1.1.0 and I need to write a mutation with the ability to upload a file. In Relay Classic you can use getFiles() to support file uploads in mutations: class AddImageMutation extends Relay.Mutation { getMutation() { …
Maikel Ruiz
  • 1,342
  • 2
  • 15
  • 25
4
votes
2 answers

Relay Modern - How to use fetchQuery without fragmentContainer

so I am working on relay for react application with server side rendering. I'm trying to use relay to get data from graphql endpoint. I was kinda following this, using fetchQuery to get data by making request from compiled graphql by…
andiwin
  • 1,552
  • 3
  • 14
  • 27
4
votes
2 answers

Relay Compiler not generating .graphql files

Module not found: Error: Can't resolve './generated/GetAllCities.graphql' the component: export class Map extends React.Component { 21 constructor(props){ 22 super(props); 23 }; 24 render(){ 25 return( 26
27 …
liminal18
  • 563
  • 7
  • 21
4
votes
2 answers

GraphQL: Many small mutations, or one bulk mutation?

Let's say I am a user and I am editing my profile on some arbitrary app. The app let's me make a bunch of changes, and when I'm done, I click on "Save" and my profile gets updated. What is the recommended best practice in GraphQL to handle a large…
Jon Cursi
  • 3,301
  • 4
  • 27
  • 53
4
votes
2 answers

How to setup a GraphQL Relay API in Rails

I'm trying to wrap my head around GraphQL/Relay and I'm finding hard to get started on how to correctly setup a Relay compliant GraphQL API using Ruby on Rails. I've found multiple tutorials on how to do…
Carlos Martinez
  • 4,350
  • 5
  • 32
  • 62
4
votes
2 answers

Is it possible to use RelayJS and GraphQL without the ReactJS?

I'm trying to figure out if there is a way of using RelayJS and GraphQL without ReactJS. Im quite fond of how those three works in data management and at the same time, im looking forward on using the jeasyUI for the design of my web application.…
Jam
  • 43
  • 4
4
votes
1 answer

GraphQL with React Router Relay: Expected type Int, found String for numeric route

I have the following Router and routes using the react-router-relay package ReactDOM.render(
danronmoon
  • 3,814
  • 5
  • 34
  • 56
4
votes
1 answer

An approach to deal with dependency resolution and optimistic updates in react applications

In an architecture where objects have many complex relationships, what are some maintainable approaches to dealing with Resolving Dependencies Optimistic Updates in react applications? For example, given this type of schema: ``` type Foo { …
Stepan Parunashvili
  • 2,627
  • 5
  • 30
  • 51
4
votes
3 answers

How to dynamically change the network layer in Relay

I know relay can inject a network layer when bootstrapping like below: Relay.injectNetworkLayer( new Relay.DefaultNetworkLayer('http://example.com/graphql', { headers: { Authorization: 'Basic…
Ron
  • 6,037
  • 4
  • 33
  • 52
4
votes
1 answer

Separate graphql/relay backend and frontend

I would like to separate my backend and my frontend with different projects using relay. The reason I'm doing this is because I'm using a particular relay/graphql backend, sangria and would like to keep the frontend development separate from the…
Atol
  • 569
  • 4
  • 12
3
votes
0 answers

graphene relay "Resolved value from the connection field have to be iterable or instance of"

I want to use graphene with relay together with a custom database connector. My schema is looking like: class DBItem(DjangoObjectType): class Meta: model = DB filter_fields = { 'id': ['exact'], 'LOGID':…
Gerd
  • 777
  • 1
  • 7
  • 12
3
votes
3 answers

How to implement Relay node query with GraphQL federation

We are trying to implement Relay node query with Apollo federation. Since Apollo is not aware of Relay, we have to implement the node query in some service (Node Resolution Service) interface Node { id: ID! } type Query { node(id: ID!):…
Lukas
  • 13,606
  • 9
  • 31
  • 40
3
votes
0 answers

Postfix - relaying specific email addresses within a mydestination domain

Having some issues trying to get something working on postfix. That is, I have a domain abc.com which is a destination domain on my postfix server 1.2.3.4, it hosts mailboxes for addresses in this domain locally by default -…
STOIE
  • 141
  • 1
  • 9
3
votes
0 answers

Relay and Apollo Client both can be used?

I'm developing a front-end with Next.js where GraphQL will be processed from GraphQL API endpoint. Hasura is being used as Back-end. One of my colleague told me that some developers use Relay along with Apollo Client. I told him that why we should…