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...
This is an example document of my mongoDB. I need to get the content.en array via Apollo/GraphQL. But the nested object is getting a problem for me. en is the language tag, so it would be great if this could be used as a variable.  Data in MongoDB  {...
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 am running Apollo lambda server for GraphQL. I want to intercept the GraphQL query/mutation from the POST request body and parse it so I can find out which query/mutation the request is asking for. The environment is Node.js.  The request isn't...
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...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.