Questions tagged [mercurius]
7 questions
                    
                    1
                    
            vote
                
                0 answers
            
        How to enable Redis cache and Loaders using Nest and Mercurius
I'm using Nest and Mercurius to create a GraphQL API. So far I was able to create queries and resolvers, but now I want to enable Loaders and Cache to improve performance. The documentation is not clear on Nest on how to do that with GraphQL. On the…
        
        pbonnefoi
        
- 263
 - 5
 - 16
 
                    0
                    
            votes
                
                1 answer
            
        Another way of merging graphql resolvers
In many tutorials that I have read, the most common way of using graphql resolvers is like below.
export const rootResolvers: IResolvers = {
  Query: {
    getUserById: async (root, { id }, context, info) => {
      return await…
        
        Jules Betfien
        
- 25
 - 2
 - 6
 
                    0
                    
            votes
                
                0 answers
            
        File Upload on apollo gateway
I have two graphql subgraphs server a and server b. Each running fastify and mercurius and using grapqql-upload to handle files. I also have an apollo gateway connected to both servers and working well for queries and mutations. However when using…
        
        Cyrille keith
        
- 21
 - 3
 
                    0
                    
            votes
                
                0 answers
            
        Mercurius-codegen error Cannot find name '_Service
I am implementing a graphql api subgraph using Mercuriusjs, @mercurius/federation and typescript by following their doc. But always getting error
Here are some parts of my code.
server.ts
const app = Fastify();
const PORT = 4001;
const…
        
        Jules Betfien
        
- 25
 - 2
 - 6
 
                    0
                    
            votes
                
                0 answers
            
        Why does useGenericAuth not change the context as expected?
Cutting straight to the case: backend project using typescript and graphql.
We have a package /graphql_gateway where all requests are sent to. This gateway uses graphQL mesh to stitch the schemas of our Supabase and our server which is located in…
        
    
                    0
                    
            votes
                
                1 answer
            
        TypeScript : conflicting target/module compilerOptions in tsconfig.json
I've recently started to write a little graphql server on node.js based on fastify and mercurius. But being forced to learn many new stuff at the same time, I chose to start in javascript rather than typescript in order to avoid having to learn one…
        
        ankou29666
        
- 16
 - 1
 
                    0
                    
            votes
                
                1 answer
            
        In Typescript how to properly declare a Mercurius resolver?
I have a custom context as defined below, which I am passing to Mercurius.
export interface Context {
  prisma: PrismaClient
}
const prisma = new PrismaClient()
export const context: Context = {
  prisma: prisma,
}
My Mercurius definition is as…
        
        AppleGrew
        
- 9,302
 - 24
 - 80
 - 124