graphql-js Questions

1

I'm working on the application that uses GraphQL. I'm using urql GraphQL client and really like it so far. What are the advantages of using Apollo/Relay over urlql?
Foretoken asked 17/7, 2019 at 22:59

1

I am trying to upload files with Angular Apollo as Client and Apollo 2.0 as Server. Trust me, I tried every tutorial, example I could find on the internet but no help. There's a library called apo...
Wallywalnut asked 25/4, 2019 at 3:40

1

Is there a technique that would let me declare ADT like this in GraphQL? // TypeScript type SomeAlgebraicDataType = | { state: 'A', subState1: string } | { state: 'B', subState2: string, subSta...
Hetero asked 15/12, 2017 at 22:49

1

Solved

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 modu...
Handmaid asked 21/7, 2019 at 20:9

1

Solved

In tutorial https://www.howtographql.com/vue-apollo/1-getting-started/ there is presented new HttpLink syntax, but in official docs https://www.apollographql.com/docs/link/links/http/ fun...
Woodhouse asked 19/6, 2019 at 8:19

2

Solved

I have a relationship between User and Post. This is how I query the User Posts. const UserType = new GraphQLObjectType({ name: 'User' fields: () => ({ name: { type: GraphQLString }, post...
Hanleigh asked 27/9, 2016 at 18:49

1

Solved

I've been reading through the graphQL docs and found that they've explained the implementation of the graphql server in 2 ways: one using graphql-yoga which is a fully featured graphql server and a...
Druci asked 25/4, 2019 at 17:7

1

Solved

Trying out relay with react and ran into this today. Here is what I've done so far. Root Query: query { tasks { id taskName taskStatus userId } } React component hierarchy App ↳--TaskL...
Gentlefolk asked 22/4, 2019 at 16:25

2

I am trying to write a query to retrieve an object with the property linkedCards that contains an array of objects with different schemas. I have 3 different schemas (built in Contentful): CardA ...
Gulick asked 15/4, 2019 at 22:25

1

Solved

I'm struggling with my GraphQL API because I need to take advantage of Enums while keeping their full description in the frontend. In short: I have different states for a product: "Has been sent",...
Gasket asked 14/5, 2018 at 15:47

1

Solved

I am in the process of learning GraphQL and have stumbled upon understanding the difference between Operation Arguments and GraphQL variables. Because IMO, both provide, client, the facility to pas...
Aufmann asked 2/4, 2019 at 11:8

2

Solved

Here are my requirements: "add" mutation, every field(or called scalar) of BookInput input type should have additional type modifiers "!" to validate the non-null value. Which means when I add a...
Stepheniestephens asked 25/7, 2018 at 11:5

1

Solved

Previously, I just typed my input KeyInput as mode: String!, and I'm looking to change the type from String! to a custom enum. I have the tried following schema: enum Mode= { test live } inpu...
Rebeccarebecka asked 12/3, 2019 at 3:8

3

I am trying to setState() to a query result I have from graphQL, but I am having difficulty finding out how to do this because it will always be loading, or it's only used from props. I first set ...
Multiple asked 27/9, 2017 at 20:52

1

I'm trying to figure out how to implement bottom up filtering in a parent-child relationship using GraphQL. Consider the following basic type hierarchy modelling a parking lot and available parki...
Shalom asked 20/2, 2019 at 18:3

3

I've recently started to research the possibility of using GraphQL for requesting dynamic data configurations. The very first thing that jumps out at me is the strongly-typed concept of GraphQL. I...
Rote asked 11/12, 2015 at 21:37

1

Is there a way to add a schema directive by overriding one of the methods of SchemaDirectiveVisitor for all the queries and mutations? For example to check the authentication token in a directive....
Camala asked 10/1, 2019 at 6:57

5

Solved

How do you prevent a nested attack against an Apollo server with a query such as: { authors { firstName posts { title author { firstName posts{ title author { firstName posts { title ...
Dissimilar asked 20/5, 2016 at 3:29

1

Solved

So, I'm using the gatsby-mdx plugin to create a site from MDX files. I want to create an association between the SitePage object and the Mdx object so that I can do one graphQL query of the SitePag...
Vasculum asked 15/1, 2019 at 16:52

1

Solved

Are there any notable differences between the two? Im interested in anything from runtime and startup performance to features and workflow differences. Documentation does a poor job on explaining t...
Selfaddressed asked 31/12, 2018 at 6:0

3

When defining a query in a schema, how do I refer to a value of an GraphQLEnumType declared previously, to use it as the default value of an argument? Let's say I've defined following ObservationP...
Quaternion asked 16/4, 2016 at 16:19

3

I don't seen any clear way to query an outside GraphQL endpoint (i.e. https://somewebsite.com/graphql) for data. Has anyone else done this, and how did you do it? I assume it requires you to buil...
Lugo asked 14/2, 2018 at 6:6

3

I'm looking at graphql. Is it possible to define an object with arbitrary attributes? Let's say I have some data like: editOptions : { boxes : 3 , size : { width: 23,height:32} , color: #434343 },...
Scintillator asked 20/11, 2015 at 5:31

1

Solved

I have a question about AppSync error handling. I would like to send errorInfo object along with the error response and I tried with $util.error. Per the document: https://docs.aws.amazon.com/appsy...
Exenterate asked 27/11, 2018 at 6:23

1

In an update to our GraphQL API only the models _id field is required hence the ! in the below SDL language code. Other fields such as name don't have to be included on an update but also cannot ha...
Latinity asked 7/11, 2018 at 16:49

© 2022 - 2024 — McMap. All rights reserved.