Questions tagged [graphql]
Use this tag for questions involving code that is consuming a GraphQL API. Note that a GraphQL schema isn't reviewable on its own.
10
questions
1
vote
0
answers
64
views
The most efficient way to run a simple useQuery hook when a component mounts
I have a very simple API query (using GraphQL - URQL, but the client used doesn't matter) that just fetches data and displays it on the page, and I’m trying to figure out the most efficient way to ...
1
vote
1
answer
80
views
Optimising a simple graphql mutation resolver
I am writing a resolver for a typical updateUser mutation with node, Apollo Server and mongoDB. I want to make it such that, when the ...
1
vote
0
answers
30
views
Creating records in several tables with a single mutation
I'm studying nodejs w/ graphql and I would like to make sure I'm going in the right direction here.
My study project is based on a simple ERP with entries, products, orders and users.
I have one ...
1
vote
0
answers
46
views
Avoiding Duplicated Code Fragments Graphene in FastAPI
How can I avoid repeating code fragments between the mutations and types with graphene in a FastAPI app? I really want to avoid repeating any codes for obvious reasons.
graphql\mutations.py
...
2
votes
0
answers
38
views
Cursor-based search result pagination
Can you guys review my GraphQL search pagination function? I'm afraid there could be some performance issues, or something. Especially at the aggregation section and this ...
1
vote
0
answers
413
views
Secure auth with Node.js, GraphQL, Nexus and passport with JWT's
I am trying to authenticate / authorise users with graphql, nexus, passport, prisma, graphql-shield and fastify for REST with JWT
To answer possible questions: I am using passport because it handles ...
2
votes
1
answer
217
views
Peer to Peer GraphQL with Relay over WebSocket
Here is my Relay Network:
...
1
vote
0
answers
32
views
Using two handlers for a GraphQL project; handle query with the second one if the first one is not capable of
I'm trying to use both SuperGraph as-a-library and GqlGen.
So I have two handlers:
the first one is SuperGraph; this checks that it can carry out the operation
the second one is GqlGen; this checks ...
1
vote
0
answers
25
views
Creating two different posts types on my Gatsby site - rewriting my gatsby-node.js
I need to identify the different markdown files I have so I can create a unique url structure for them. I can already identify "notes" files, and want to create a second type called "...
2
votes
0
answers
558
views
GraphQL Schema for a Social Network [closed]
I am learning about GraphQL so I decided to make a schema for some sort of social network. Please let me know if there are any best practices I should follow based on my schema below.
...