menu
Channels
Team
Posts
Members
Info

Mongo examples without mongoose (and some other newbie questions)?

Hi, I'm working on a personal project to learn some new tools (Mongo, GQL, and Apollo mostly) and I'm a bit confused. It seems like all the tutorials I find are using Mongoose to interact with Mongo. However, I would rather not use Mongoose because I don't really need the schema…

thumbsup
0
message-simple
1

Best way/place for mongoose.connect?

Hey guys is there a standard way to connect to mongoose/mongodb atlas? Currently I wrapped my httpServer.createServer like this which gets called after successful connection. …

thumbsup
0
message-simple
1

Handling multiple Mongoose errors (validation) in a GraphQL resolver?

Hey, folks. I'm working with a user registration resolver using Apollo Server, and I'm not sure how we're supposed to go about handling multiple errors being thrown from model validation stuff from Mongoose. As of right now, I have this current model that I am using to store…

thumbsup
0
message-simple
0

Share types between files with mergeSchemas?

Hi all, I have the following layout for my schemas. Schema 1: …

thumbsup
0
message-simple
7

Shared types and interfaces across federated services

Hi all, What's the best way for multiple federated services to share common identical type definitions (e.g. Node and PageInfo for Relay pagination) such that we don't face countless "can only be defined once" errors on those types and their constituent fields? Would it make…

thumbsup
0
message-simple
0

Does RedisCache work in Dev mode?

Hello, Just hooked my Apollo server to a redis cache Nothing has shown up in the redis instance, yet, so I was wondering if it only works in production. How do I tell if it is working? …

thumbsup
0
message-simple
2

Authorization on subscriptions using schema directive.

This is weird for me. According this document i made my Auth SchemaDirective like this: This works fine in every Query, Mutation, Subscription …

thumbsup
0
message-simple
0

@cacheControl does not work unless defaultMaxAge is set

Trying to setup caching with apollo-server-plugin-response-cache and apollo-server-cache-redis all on latest version. I have found that setting field-level cacheControl either using @cacheControl directive or from resolver does not actually cache unless I set defaultMaxAge as…

thumbsup
1
message-simple
0

Someone know how do that?

https://stackoverflow.com/q/57049366/3015545

thumbsup
0
message-simple
0

Opinion/best pratices advise

Hello everyone. I'm building an express middleware to handle all the rest requests my front-end app does and adopt Apollo and Graphql. I already have a project using Apollo Client, but now I'm moving to a middleware aproach. I've created this base project,…

thumbsup
0
message-simple
0