Questions tagged [graphql-modules]

7 questions
4
votes
0 answers

GraphQL Module - Run middleware for all operations except public ones

I started working with GraphQL Modules, and they introduce the concept of middlewares, in which you can apply at different levels. I configured a middleware for my whole application like this to require authentication: export const modularApp =…
3
votes
1 answer

Can't set context to resolvers in apollo server

Hello I'm new to GraphQl and to Apollo Server. I would like to implement authentication on my project. But For some reason, I can't seem to set context on my resolvers in apollo server. Here's my index const server = new ApolloServer({ …
1
vote
1 answer

How to use custom directives graphql-modules with apollo

I need help with custom directives when using graphql-modules library. Have no idea where to place my custom directives so it is combined with overall schema
Victor Orlyk
  • 1,454
  • 2
  • 15
  • 27
1
vote
0 answers

Graphql-modules Schema is not valid when using jest

I am setting up a new project using graphql-modules and am trying to get some tests running on my first module. My module is pretty simple import { GraphQLModule } from "@graphql-modules/core"; import * as typeDefs from…
Rick
  • 1,063
  • 8
  • 26
0
votes
1 answer

When `instanceof` is acting up

I recently filed an issue on GitHub but the project doesn’t seem to be very active so I am unsure if it will reach many fellow developers. Here is the link to the issue: https://github.com/Urigo/graphql-modules/issues/2337. To give a bit of context,…
0
votes
0 answers

GraphQL Shield with Yoga and Modules

I've been developing a site that uses Yoga Server, and Modules, and looking at using Shield for security. However no matter what I seem to do, I can't get Shield to integrate with Yoga, and Modules. Here is my code (note I have stripped parts out…
0
votes
1 answer

How to get a type of a single resolver function?

I wondering if it possible to get a type of single resolver function generated by graphql-codegen? I also use graphql-modules with graphql-modules-preset. All of these libraries provide me a list of automatically generated types, but unfortunately I…
Roman Mahotskyi
  • 4,576
  • 5
  • 35
  • 68