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
46
votes
13 answers

Lodash debounce with React Input

I'm trying to add debouncing with lodash to a search function, called from an input onChange event. The code below generates a type error 'function is expected', which I understand because lodash is expecting a function. What is the right way to do…
Michael Kaufman
  • 683
  • 1
  • 9
  • 19
31
votes
1 answer

Why should I use Apollo/Relay over urql?

I'm working on the application that uses GraphQL. I'm using urql GraphQL client and really like it so far. What are the advantages of using Apollo/Relay over urlql?
A. Karnaval
  • 727
  • 2
  • 8
  • 12
21
votes
1 answer

github graphql api, what does "clientMutationId" mean?

I saw clientMutationId field in example-strong-typing documentation. mutation { addComment(input:{clientMutationId: 1234, subjectId: "MDA6SXNzdWUyMjcyMDA2MTT=", body: "Looks good to me!"}) { clientMutationId commentEdge { node { …
Lin Du
  • 88,126
  • 95
  • 281
  • 483
19
votes
2 answers

Role of QueryRenderer in Relay Modern?

So, first a bit of background. I'm a native iOS/Android developer who is now starting my first ever React Native project. It comes with all the benefits and pains of Javascript, but I like it a lot so far :-) I decided to also try my hand at…
jhm
  • 4,379
  • 5
  • 33
  • 49
18
votes
2 answers

Enable PK based filtering in Django Graphene Relay while retaining Global IDs

Problem I am using django-graphene with Relay on our GraphQL Server. The implementation imposes a Global ID requirement in the graphene.relay.Node class that overrides and hides Django's ID field. As a result, I can query like this: { …
rtindru
  • 5,107
  • 9
  • 41
  • 59
14
votes
3 answers

What is the reason for having edges and nodes in a connection in your graphql schema?

I am trying to understand more complex graphql apis that implement the Relay Cursor Connections Specification If you look at the query below that I run on the github graphql api explorer { repository(owner: "getsmarter", name: "moodle-api") { …
Ryan-Neal Mes
  • 6,003
  • 7
  • 52
  • 77
13
votes
1 answer

How to wire data to a deep component in react-router-relay?

I have a route like this The basic Search component looks likes this class Search extends React.Component { constructor (props) { super(props) this.state = {query: ''} } handleSubmit (event)…
Mulan
  • 129,518
  • 31
  • 228
  • 259
12
votes
3 answers

Where the data is Storing in Graphql

I started to use graphQl with react relay. And I followed some tutorials and I can able to get and post with the help of mutations and queries. Everything works fine but my question here is, Where qraphql is saving the data and fetching that for…
11
votes
0 answers

Nested pagination with relay graphql

Currently having an issue with the relay approach to nested pagination. An example below to illustrate what I mean: { "data": { "locations": { "edges": [ { "node": { "id": "Location_254" } …
10
votes
3 answers

How can I print the schema in HotChocolate as GraphQL SDL

It would be great for development with Relay to print the GraphQL SDL directly with the Hot Chocolate GraphQL server. Is there a way to do this? schema { query: Query } type Query { sayHello: String }
10
votes
0 answers

Is it possible to output simplified Typescript types in the compiled distribution of a Node module

I am trying to create more simplified output in the *.d.ts typescript files which are included with the bundled version of my modules code. These files are generated through a chain involving the typescript compiler, babel, and rollup. I am also…
jswidler
  • 355
  • 1
  • 10
9
votes
3 answers

How to get the Model ID in the Graphene Django Relay query?

How to receive the native Model ID that stored in the DB (eg. django model ID) when we are executing the Relay query? The main issue that the Relay defines it's own ID so I'm not sure how can we correctly handle it. For ex. query { allFuelTypes…
Velidan
  • 5,526
  • 10
  • 48
  • 86
9
votes
1 answer

How to link schema in "GraphQL for .NET" and "Relay"?

I want to build a web app with Javascript for the front end and C# for the back end and I want to determine the value of GraphQL. For my C# back end I use a GraphQL implementation named GraphQL for .NET. For my front end, I would like to use Relay…
Michael Hilus
  • 1,647
  • 2
  • 21
  • 42
8
votes
0 answers

Custom scalar in schema mapped to type

I'm following the example of getting started using relay with typescript(https://relay.dev/docs/en/quick-start-guide) and it inititlly works as expected. I am trying to modify my schema to include some custom scalars, so my schema looks something…
crafty
  • 10,346
  • 1
  • 18
  • 15
8
votes
0 answers

How to send data from fragment to deep nested component?

I'm working with Relay Modern on Project. But I'm not sure how to send data from a place when I put fragment to place where Is component placed. for example: this is components composition -Page (QueryRenderer) ---Header ---body ---List …
Grund
  • 309
  • 1
  • 2
  • 12
1
2 3
43 44