Questions tagged [relaymodern]

145 questions
0
votes
1 answer

How to refresh an item in a list for Relay Modern

In Relay Modern, how do you refresh just an item in a list? I have a pagination list. Later in a code, I want to refresh just an item, not the entire list. How do I do that in Modern Relay?
Joon
  • 9,346
  • 8
  • 48
  • 75
0
votes
1 answer

after mutation relay modern connection handler is undefined

I'm doing a mutation of multiple items. But the connection handler in updater returns undefined. I'm dealing with the shopItems type, Here's the relevant schema type Mutation { shopItem(input: itemsInput): addedItems } type addedItems { …
Saud Punjwani
  • 477
  • 1
  • 4
  • 14
0
votes
1 answer

Relay modern + GraphQL + found-relay - transformation before child gets a fragment

I want to build a simple routing where my Table component receives the fragment Table_table: routing.js const tableQuery = graphql` query routesTableQuery($tableId: String){ store { table(id: $tableId){ name …
OKey
  • 182
  • 1
  • 2
  • 10
0
votes
0 answers

async await inside function not working properly?

I have this function, that i need to define an async function inside it: _refetchConnection = (page) => { // query for cursor page const refetchVariables = async (fragmentVariables) => { let pageCursor; if(page !== 1) { const…
gpbaculio
  • 5,693
  • 13
  • 60
  • 102
0
votes
1 answer

How do I properly create a connection in relay & graphql schema?

I am trying to create a pagination in relay & graphql in my schema. This is my code: const GraphQLFriendByUser = new GraphQLObjectType({ name: 'FriendByUser', fields: { id: globalIdField('FriendByUser'), _id: { type:…
gpbaculio
  • 5,693
  • 13
  • 60
  • 102
0
votes
1 answer

How to update variables using createRefetchContainer?

Since the React Relay createPaginationContainer does not support offset-based pagination, the next best option would be to handle this feature through the use of the createRefetchContainer. In the example provided on the Relay Modern documentation…
Scot Matson
  • 745
  • 6
  • 23
0
votes
1 answer

don't know why my cursorForObjectInConnection returns null?

I am having this error on response: Cannot return null for non-nullable field TodoEdge.cursor. This is my mutation code: mutateAndGetPayload: async ({text}, context) => { let newTodo = new TodoModel({ text, _creatorUserId:…
gpbaculio
  • 5,693
  • 13
  • 60
  • 102
0
votes
3 answers

Force refetch in Relay Modern RefetchContainer with no (new) variables

I'm trying to find out how/if it is possible to trigger a refresh in a Relay Modern RefreshContainer without passing (new) variables? I’m looking for the best way to implement the good ol’ pull-to-refresh on a React Native list, that should simply…
jhm
  • 4,379
  • 5
  • 33
  • 49
-1
votes
1 answer

CORS enabled, but adding cookies in header causes request to be blocked? I have enabled CORS with credentials server side, not sure how to solve this

Using express-session so need cookie id for authentication, but even with setting up CORS correctly (or what I thought to be) on front and back end I'm still getting issues. CORS is working without cookies enabled. Backend config const corsOptions =…
Will Cowan
  • 81
  • 8
-1
votes
1 answer

how to integrate routing(found-relay) in relay without its typings?

i want to create a web app in relay using found-relay routing. I looked at this sample in relay modern which i think is great: sample but i try tried to look at found-relay and I can't find @types/found-relay unlike @types/react-router-dom? i am…
gpbaculio
  • 5,693
  • 13
  • 60
  • 102
1 2 3
9
10