JCM

#graphql

Posts com a tag graphql

    1. Introduction to GraphQL Mongo HelpersIf you are using MongoDB and GraphQL, you probably have some arguments on your resolvers to filter the data returned from MongoDB. Using those helpers you can reduce the amount of code duplication when doing that!
    2. Client-Supplied Custom Sorting Using GraphQLIt’s not uncommon the need to sort/order data returned from an API, based on arguments sent by the client. With REST we could just use query-strings, but how to do it in GraphQL?
    3. GraphQL Mutation Arguments Validation with Yup using graphql-middlewareRecently, I found out about the awesome library by Prisma called graphql-middleware, which allows running arbitrary code before/after your GraphQL resolvers are called.
    4. Parallel testing a GraphQL server with Jest and MongoDBThis is a follow-up to the awesome post written by Sibelius Seraphini: Testing a GraphQL server using Jest
    1. Encapsulating data on GraphQL using LoadersIf you have already used GraphQL, you probably saw that it can consume data coming from the most varied sources, be it a local database or an external API, while centralizing them in a single, self-contained, API.
    2. Access Control List on GraphQL with LoadersIn our previous post, we saw how to encapsulate data from any data source to be used on our GraphQL resolvers using Loaders, now let’s see a more robust example of that, on how to create some access control rules directly on those loaders.