I have two GraphQL type:  type Author {   id: String!   name: String! }  type Book {   id: String!   author: Author!   name: String! }   In my database, it is implemented by a foreign key inside the books table:  table authors (pseudo code)  `id` INT...
I'm working on this library https://github.com/ilyaskarim/wertik-js called Wertik JS to make GraphQL + Rest API more easily, In resolvers, when I console log info, it shows undefined. For each module, I have created dynamic resolvers to make thin...
I have a mutation like  mutation deleteRecord($id: ID) {     deleteRecord(id: $id) {         id     } }   and in another location I have a list of elements.   Is there something better I could return from the server, and how should I update the list?...
I'm trying to use a custom error with apollo-server and it seems that my custom error has a property (code) that isn't available from within formatError.  import ExtendableError from 'es6-error'  export default class MyError extends E...
I am using react-apollo on meteor with mysql and sequelize, I am still a beginner in JS. Lets assume I have the following resolver function on my apollo-server:   export default resolvers = {      Query: {          posts(_, args){              return...
I have a client server and an API, both using Apollo. When the user logs in with Facebook I want to send a token to my client server which will then be appended to the headers of every request made to the API. Without using sessions.  Here's how...
I want to add a validation layer to the apollo server. It should run after every graphql query / mutation but before the resolver function. The validation layer will need to know the graphql query / mutation being called and the passed parameters. It...
I'm learning GraphQL, and in EVERY example that I saw, the signup/login and me calls are in the mutation and query types. Why is that? Example:  type Query {   me: User }  type Mutation {   login(email: String!, password: String!): String }   Sho...
I have an Apollo GraphQL server and I have a mutation that deletes a record. This mutation receives the UUID of the resource, calls a REST (Ruby on Rails) API and that API just returns an HTTP code of success and an empty body (204 No Content) when t...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.