graphql-js Questions
8
Solved
With REST we can use Swagger, RAML or other technologies to document our API and generate an HTML documentation that our consumers can read without any need of interaction with the servers.
Does so...
Targe asked 15/9, 2016 at 7:10
2
Solved
After reading this walkthrough in the official documentation:
http://graphql.org/graphql-js/object-types/
I am very confused about how to make custom scalar type resolvers without a third party l...
Diffractometer asked 15/12, 2017 at 1:34
9
Solved
Getting EOF error every time at same line, changed code many times and even degraded to previous versions of graphql but no positive results.
My code is:
const graphql = require('graphql')
const _...
Boxboard asked 12/6, 2018 at 23:43
3
I have this code right here
import React from "react";
import { useQuery } from "@apollo/react-hooks";
import gql from "graphql-tag";
const FETCH_POSTS_QUERY = gql`
...
Artistic asked 7/5, 2022 at 18:32
6
Solved
Given the following code:
import { graphql } from 'graphql'
import graphqlTools from 'graphql-tools'
const { makeExecutableSchema } = graphqlTools
const typeDefs = `
type Query {
as: [A]
}
typ...
Catabolism asked 3/10, 2018 at 21:26
5
I'm trying to generate a GraphQL schema.
I have the following Resolvers. The 3 of them are in different files. 2 of them are for gathering data while one of them is just a trigger API to have them...
Bittner asked 17/3, 2020 at 9:13
6
Solved
I have an graphql/apollo-server/graphql-yoga endpoint. This endpoint exposes data returned from a database (or a REST endpoint or some other service).
I know my data source is returning the correc...
Superfuse asked 27/5, 2019 at 2:53
3
Solved
I am trying to query a graphQL endpoint but I can't figure out what I am doing wrong. How am I supposed to set up the graphQL object to pass over. If I am trying to pass
{
name {
age
}
}
How...
Hansiain asked 5/3, 2016 at 6:53
2
Solved
The question is about the interaction of a mutation, optimistic response, and a watchQuery.
I have a mutation "myMutation" which has an "optimisticResponse" and an implemented "update" function.
...
Dominique asked 16/5, 2018 at 7:44
3
Solved
How do I get around this error? For this particular schema, I do not need any queries (they're all mutations). I cannot pass null and if I pass an empty GraphQLObjectType it gives me the error:
T...
Cymar asked 23/1, 2019 at 7:27
3
Solved
I am using the apollo-client library to query data from my Graphql server. Some of the queries are sent to the server every 5 seconds through apollo polling ability.
Is there a generic way to add ...
Buote asked 1/2, 2018 at 8:53
1
Solved
I got this type of query
query {
searchRandom (param : MyObjectClass){
city
}
}
How may I set param with the type of MyObjectClass and pass it in the query? To be able to test here?
Louisalouisburg asked 18/2, 2022 at 19:20
3
Solved
I'm trying to get the current user but in the resolver I get undefined, in the jwt strategy I get the user object using the token but in the resolver the user is undefined
auth guard
import { Execu...
Gaudy asked 26/4, 2020 at 17:34
2
I understand that mutations are sequential, so it makes sense to me that if Mutation 1 creates an entity and returns an id, that Mutation 2 should have access to that id. However I don't see any ex...
Applied asked 8/6, 2017 at 16:54
4
Solved
I am learning GraphQL for my project using this tutorial:
https://www.youtube.com/watch?v=ZQL7tL2S0oQ&ab_channel=WebDevSimplified
and I get the error:
TypeError: expressGraphQL is not a functio...
Noach asked 31/12, 2020 at 7:36
3
Solved
Why am I getting this error from my schema file?
Error:
graphql/jsutils/invariant.js:19
throw new Error(message);
^
Error: Entity fields must be an object with field names as keys or a function...
Resistencia asked 8/9, 2016 at 23:46
3
Solved
I'm trying to query a list of objects having array of IDs. Something similar to following SQL query:
SELECT name FROM events WHERE id IN(1,2,3,...);
How do I achieve this in GraphQL?
Subshrub asked 16/11, 2016 at 23:40
2
Solved
im trying to perform a query like this:
{
people{
pet{
name
}
}
}
result:
{
"people": {
"pet": null
}
},
{
"people": {
"pet": {
name: "steve"
}
}
}
What i want is to get only peo...
Afghan asked 22/6, 2016 at 13:11
1
I'm new to GraphQL. I'm using API's from Amazon and Itunes to get the title (and other information) of a book. I'm returning an object like this:
var data = [];
data.title = results[0].title;
data...
Crean asked 18/1, 2018 at 12:44
2
Solved
I am new to using AWS Amplify and GraphQL.
Also just started building out React Native App - which is a lot of fun!
I have a table called TimePeriods schema for it looks like this
type TimePerio...
Marozas asked 25/3, 2020 at 17:18
2
Solved
index.ts:
const server = new ApolloServer({
typeDefs,
resolvers,
context: ({ req, res }: any) => ({ req, res })
});
UserSchema.ts
export const typeDefs = gql`
scalar TimeStamp
type Qu...
Mouton asked 18/3, 2020 at 21:11
2
Solved
I have googled cypress request with graphql but I see lots of people mentioning mock up server, stub and so on. But I am not able to find a ful example of how to use GraphQL with cy.request.
Anticline asked 23/4, 2018 at 19:3
3
Solved
I get an error when I make a query/mutation/subscription with gql (from 'graphql-tag').
Has anyone had this error and know how to fix it ?
Here is my code :
import React from 'react';
import { Muta...
Hydrogeology asked 29/7, 2018 at 10:42
2
Solved
I was wondering what the significance of the string that follows the query type, in this case "ProvisionQueues", it seems removing this from the string doesn't affect anything - is it just for logg...
Lizarraga asked 13/3, 2016 at 9:21
4
Solved
I'm trying to add a new template to the gatsby-starter-hero-blog, but my GraphQL query for the new template is being rejected:
warning The GraphQL query in the non-page component
"/Users/mc/work...
Jurado asked 18/8, 2018 at 20:54
© 2022 - 2024 — McMap. All rights reserved.