A library to help construct a graphql-js server supporting react-relay.
Questions tagged [graphql-relay]
14 questions
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
2
votes
2 answers
Cyclic schema giving error as "Error: Schema must contain unique named types but contains multiple types named "Node"."
I am new to 'GraphQL' using nodejs. I am stucked into bi-directional schema mapping. posts <-> authors. Using graphql and graphql-relay module.
Following are the two schema we are using.
--posts.js // here we are requiring authors.js
const {
…

HDB
- 782
- 2
- 7
- 18
2
votes
1 answer
GraphQL relay return one record
I using graphql-relay in my project
When run this query in my grapgql:
{
viewer{
boRelayCustomerInfo(_id:"59267769de82262d7e39c47c") {
edges {
node {
id
}
}
}
}
}
I gave this error:
"message":…

Saeed Ghareh Daghi
- 1,164
- 1
- 13
- 21
1
vote
1 answer
Should I minimise the number of subscriptions in my relay application?
I am new to using graphql and we have built a backend graphql server using elixir and we are building a frontend app using react and react-relay.
My question is whether it is better to have one large subscription at the root of my query renderer…

Joey Gough
- 2,753
- 2
- 21
- 42
1
vote
0 answers
GraphQL Design: May edge have own subedges (connections, relationships)?
Let's say that a user creates an order with products in a e-shop, but ordered products have their options to be selected during order process. So user has to select products with some options to buy.
In graphql there are three types: Product,…

piotrpawlowski
- 767
- 2
- 9
- 19
1
vote
0 answers
SyntaxError: The requested module 'graphql-relay' does not provide an export named 'fromGlobalId'
I am tring to use fromGlobalId from graphql-relay:
import { nodeDefinitions, fromGlobalId } from 'graphql-relay';
import db from './database/index.js';
const idResolver = (globalId, context) => {
const { type, id } = fromGlobalId(globalId);
if…

Tomer
- 1,521
- 1
- 15
- 26
1
vote
0 answers
GraphQL relay connectionFromArraySlice
There isn't any documentation for how the array meta info (arrayLength and sliceStart) should be implemented using facebook's graphql-relay-js helper library.
https://github.com/graphql/graphql-relay-js/issues/199
I managed to get it to work using…

als9xd
- 834
- 2
- 12
- 23
0
votes
1 answer
Problem with update mutation in Relay project
I am working on a Relay project and there is a problem with the update mutation. I'm new to Relay, and it's hard for me to establish what the problem is related to - with promises or with Relay settings.
When sending a mutation, the findOneAndUpdate…

Kiten
- 985
- 2
- 17
- 35
0
votes
2 answers
How to use remove mutation in Relay server?
I work with an express graphql server, prepared for react-relay.
Queries and createPost mutation works correctly in graphiql interface.
There is a problem with removePost mutation.
Trying to use it, I get this responce:
"Cast to ObjectId failed…

Kiten
- 985
- 2
- 17
- 35
0
votes
0 answers
How can I use Relay GraphQL client to upload the files
I have the following use case:
I have an Apollo compatible file (form-multipart) GraphQL resolver for handling files (in the backend).
The React App is using the Relay client.
How can I make an upload mutation using the Relay client?
The app is…

Robert Zaremba
- 8,081
- 7
- 47
- 78
0
votes
0 answers
update connection using relay subscription updater
I have a relay subscription setup in which I am getting the data in the updater which looks like this https://gist.github.com/ydvsailendar/6b9569bbcbc269246e299eb5cce18a80#file-gistfile1-txt-L10
I want to update my connection for a query so that I…

ydvsailendar
- 15
- 10
0
votes
1 answer
"Unknown argument \"email\" on field \"forgotPassword\" of type \"Mutation\"."
I would like to have an endpoint "forgotPassword" where an input is email, and there is no output (the result of the action is an email sent to the user). This looks like a mutation, rather than a query. I'm using graphqli on the front, and…

Victor Pudeyev
- 4,296
- 6
- 41
- 67
0
votes
1 answer
Relay not updating after doing subsequent mutations
Currently, we stumbled across a problem doing mutation in relay modern. We have a diary which contains many entries. Whenever user add a entry which day of diary doesn't exist, we also create a diary before create a entry. Everything works as…

Quy Ba Pham
- 91
- 6
0
votes
0 answers
In Graphql-relay.js mutation always return TypeError failed to fetch
When i include bcrypt to my mutation it is return failed to fetch error.
No mattter sync/async. When I generate hash only for logging , it showing the same error. Why it is acting like that?
bcrypt last version. Graphql-relay - 0.5.2

Хангелды Илебаев
- 23
- 8