GithubHelp home page GithubHelp logo

kamilkisiela / graphql-inspector Goto Github PK

View Code? Open in Web Editor NEW
1.6K 10.0 178.0 30.67 MB

๐Ÿ•ต๏ธโ€โ™€๏ธ Validate schema, get schema change notifications, validate operations, find breaking changes, look for similar types, schema coverage

Home Page: https://the-guild.dev/graphql/inspector

License: MIT License

TypeScript 86.03% JavaScript 1.40% CSS 0.08% Dockerfile 0.11% MDX 12.38%
graphql typescript javascript api monitoring probot-app the-guild

graphql-inspector's Introduction

Inspector

npm version Docker Pulls code style: prettier renovate-app badge Discord Chat

GraphQL Inspector outputs a list of changes between two GraphQL schemas. Every change is precisely explained and marked as breaking, non-breaking or dangerous. It helps you validate documents and fragments against a schema and even find similar or duplicated types.

You may like GraphQL Hive as well!

It's an open-source performance monitoring tool and schema registry for GraphQL.

GraphQL Hive is currently available as a hosted service but it offers self-hosting as well.

Use GraphQL Inspector however you want:

Features

  • Compares schemas
  • Detect breaking or dangerous changes
  • Schema change notifications
  • Use serverless functions validate changes
  • Validates Operations and Fragments against a schema
  • Finds similar / duplicated types
  • Schema coverage based on Operations and Fragments
  • Serves a GraphQL server with faked data and GraphiQL
  • Docker Image

Use on GitHub

Github

Use everywhere

Example

Installation and Usage

Visit our website graphql-inspector.com to learn more about the project.

Documentation

Documentation is available at graphql-inspector.com/docs.

Related

Some part of the library was ported to NodeJS from Ruby's GraphQL Schema Comparator

Contributions

Contributions, issues and feature requests are very welcome. If you are using this package and fixed a bug for yourself, please consider submitting a PR!

And if this is your first time contributing to this project, please do read our Contributor Workflow Guide before you get started off.

Code of Conduct

Help us keep GraphQL Inspector open and inclusive. Please read and follow our Code of Conduct as adopted from Contributor Covenant

License

MIT ยฉ Kamil Kisiela

graphql-inspector's People

Contributors

0xflotus avatar alinsimoc avatar ardatan avatar charlypoly avatar dependabot-preview[bot] avatar dependabot[bot] avatar dimamachina avatar dotansimha avatar enisdenjo avatar ertrzyiks avatar fabsrc avatar gilgardosh avatar github-actions[bot] avatar kalbert312 avatar kamilkisiela avatar lamchau avatar louy avatar martinglova avatar martyganz avatar mgyarmathy avatar mkaradeniz avatar mosheboker1 avatar n1ru4l avatar renovate[bot] avatar spawnia avatar tohaker avatar tuvalsimha avatar tvvignesh avatar urigo avatar velias avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

graphql-inspector's Issues

Option to let `diff` ignore deprecated fields

I sometimes want to drop deprecated fields which are no longer in use.

I'd like to have a switch for ignoring removals on deprecated fields, so that i.e. removing a non-deprecated field is considered a breaking change, but removing a deprecated field (possibly after a certain date) is not bad.

I'm not sure this is related to #215.

I may be able to take a stab at this if it's considered a valuable thing.

Enable globbing with github actions

Just like with the CLI, I would like to use glob patterns in the .github/graphql-inspector.yml config:

  path: "**/*.graphql"

However, this currently results in

โœ–  fatal     Error: Failed to load '**/*.graphql' (ref: master) 
    at /usr/local/share/.config/yarn/global/node_modules/@graphql-inspector/actions/dist/index.js:210:35
    at step (/usr/local/share/.config/yarn/global/node_modules/@graphql-inspector/actions/dist/index.js:44:23)
    at Object.next (/usr/local/share/.config/yarn/global/node_modules/@graphql-inspector/actions/dist/index.js:25:53)
    at fulfilled (/usr/local/share/.config/yarn/global/node_modules/@graphql-inspector/actions/dist/index.js:16:58)
    at process._tickCallback (internal/process/next_tick.js:68:7)

because it probably looks for a single file.

Non-breaking nullability changes mistakenly registered as breaking, when the field type isn't a built-in scalar

Changing a non-null input field to be nullable is a non-breaking change, as all valid queries before the change will still be valid after the change.

Similarly, changing a nullable query-field to be non-null is a non-breaking change, as all valid queries and valid responses from before the change, will still be valid after the change (*).

Currently, these cases will however always be marked as breaking-changes by graphql-inspectors diff function, when the field isn't a built-in scalar, due to using object equality checking between the types, rather than comparing the names of the types.

See #139 for a proposed change. Comparing type.toString() is consistent with other checks throughout the codebase.

(*) I think there are actually some awkward edge cases, where overlapping fieldnames between different types can suddenly become a problem if only one of the overlapping fields suddenly becomes non-null. This is however no more or less of a problem than for the case with built-in scalars.

Handle Scalar types

Scalar types are currently ignored when doing a diff check, should we handle them or not?

I guess we should, because when they change it is of course a breaking change. What do you think?

Other commands for Github actions

Right now it's possible to validate schema changes with Github actions by defining it in .github/graphql-inspector.yml and graphql-inspector automatically annotates the code (which is insanely cool). However, other commands, such as graphql-inspector validate for the are only supported in the CLI and not in the GH actions cli. It would be awesome if the validate command would be support there to allow seamless validation with graphql queries in frontend projects.

Validate complexity of documents

  • Default complexity value should be 1
  • Allow to define complexity by a directive
  • Allow to match complexity value based on an argument (tricky and impossibru)

CLI custom headers

Hi, I tried to use graphql-inspector cli to validate two authenticated graphql servers. My servers are using authentication via bearer token and I didn`t find anyway I can pass custom headers to my requests (just found --token option that only works for github). Would be awesome have this feature. Thanks

The graphqls extension is not accepted as an introspection output

While I can use the .graphqls extension for documents, I can't use it for the schema file in the validate command:

$ graphql-inspector validate "src/**/*.graphqls" schema.graphql
success All documents are valid
$ graphql-inspector validate "src/**/*.graphql" schema.graphqls
error Unable to find matching files for glob: schema.graphqls in directory: .

Duplicate "graphql" modules cannot be used at the same time

Well, this is fairly problematic, because some tools we are using are kinda unmaintained and depending on older versions. Mostly it's about the @playlife/gql which makes autocomplete in graphql documents possible but is heavily outdated in this regards :( The output of yarn why graphql is rather terrifying...

=> Found "[email protected]"
info Has been hoisted to "graphql"
info This module exists because it's specified in "dependencies".
=> Found "@playlyfe/gql#[email protected]"
info This module exists because "@playlyfe#gql" depends on it.
=> Found "@graphql-inspector/cli#[email protected]"
info This module exists because "@graphql-inspector#cli" depends on it.
=> Found "@graphql-inspector/api#[email protected]"
info This module exists because "@graphql-inspector#cli#@graphql-inspector#api" depends on it.
=> Found "apollo-codegen#[email protected]"
info This module exists because "@playlyfe#gql#apollo-codegen" depends on it.
=> Found "graphql-language-service-interface#[email protected]"
info This module exists because "@playlyfe#gql#graphql-language-service-interface" depends on it.
=> Found "graphql-language-service-utils#[email protected]"
info This module exists because "@playlyfe#gql#graphql-language-service-interface#graphql-language-service-utils" depends on it.=> Found "graphql-language-service-types#[email protected]"
info This module exists because "@playlyfe#gql#graphql-language-service-interface#graphql-language-service-types" depends on it.

I am not entirely sure how to tackle this...

$ D:\workspace\app\node_modules\.bin\graphql-inspector
Error: Cannot use GraphQLSchema "[object Object]" from another module or realm.

Ensure that there is only one instance of "graphql" in the node_modules
directory. If different versions of "graphql" are the dependencies of other
relied on modules, use "resolutions" to ensure only one version
is installed.

https://yarnpkg.com/en/docs/selective-version-resolutions

Duplicate "graphql" modules cannot be used at the same time since different
versions may have different capabilities and behavior. The data
from one
version used in the function from another could produce confusing and
spurious results.
    at instanceOf (D:\workspace\app\node_modules\@graphql-inspector\api\node_modules\graphql\jsutils\instanceOf.js:37:13)
    at isSchema (D:\workspace\app\node_modules\@graphql-inspector\api\node_modules\graphql\type\schema.js:35:34)

GH actions: Cannot read property 'id' of undefined

I'm not sure what caused this, but what I did is the following:

  1. push a graphql breaking change in a first commit in a branch/PR
  2. in the same branch/PR, push another commit which fixes the breaking change

using graphql-inspector v1.18.1

Successfully built 5ba9530688ed
Successfully tagged gcr.io/gct-12-5q88qkdur-z0wx0ad3sh82r/6abc6d67166c0d85f54150a3d770d59d501f091104ca4e8aa6f4c7b0880b0a01/8a5edab282632443219e051e4ade2d1d5bbc671c781051bf1437897cbdfea0f1:2c3bde79909df4dfc6c91597167c9cf1e17717e572877c239e1596ff97cc3b42
Already have image (with digest): gcr.io/github-actions-images/action-runner:latest
TypeError: Cannot read property 'text' of null
    at /usr/local/share/.config/yarn/global/node_modules/@graphql-inspector/actions/dist/index.js:205:76
    at step (/usr/local/share/.config/yarn/global/node_modules/@graphql-inspector/actions/dist/index.js:44:23)
    at Object.next (/usr/local/share/.config/yarn/global/node_modules/@graphql-inspector/actions/dist/index.js:25:53)
    at fulfilled (/usr/local/share/.config/yarn/global/node_modules/@graphql-inspector/actions/dist/index.js:16:58)
    at process._tickCallback (internal/process/next_tick.js:68:7)
โ„น  info      GraphQL Inspector started
{ repository: { object: null } }
โ„น  info      Failed to find .github/graphql-inspector.yaml file
โ„น  info      Both schemas built
โ„น  info      Start comparing schemas
โœ–  fatal     Error: TypeError: Cannot read property 'id' of undefined 
    at Object.<anonymous> (/usr/local/share/.config/yarn/global/node_modules/@graphql-inspector/actions/dist/index.js:136:33)
    at step (/usr/local/share/.config/yarn/global/node_modules/@graphql-inspector/actions/dist/index.js:44:23)
    at Object.throw (/usr/local/share/.config/yarn/global/node_modules/@graphql-inspector/actions/dist/index.js:25:53)
    at rejected (/usr/local/share/.config/yarn/global/node_modules/@graphql-inspector/actions/dist/index.js:17:65)
    at process._tickCallback (internal/process/next_tick.js:68:7)
โœ–  fatal     Invalid config. Failed to add annotation

### FAILED Check GraphQL with Inspector 11:05:54Z (26.286s)

Github Action creates an extra check run

The Action check currently does not update its own status. It instead always succeeds, then creates a new check which gets all the details.

Preferably the first, existing check would fail and have annotations added to it instead of the new check being created.

image

Require a Node Version above 8.10.0 otherwise it crashes

I am getting the following error when trying to install the api package.

pdesjardins @ ~/code/graphqlinspector/packages/api * master
[23] โ†’ yarn install
yarn install v1.7.0
[1/4] ๐Ÿ” Resolving packages...
[2/4] ๐Ÿšš Fetching packages...
error @probot/[email protected]: The engine "node" is incompatible with this module. Expected version ">= 8.10.0".
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

I would suggest to use nvm and have the .nvm file pointing to the expected NodeJS. 10.15.3 works with few warnings.

'Action Required' message from Github App?

Screen Shot 2019-05-24 at 17 20 41

Any ideas as to how I can debug things if the Github App simply says 'Action Required', and where clicking the Resolve' link merely opens https://graphql-inspector.com/ in a new tab?

Thanks for any pointers in advance ๐Ÿ˜„

Github actions not working

I can't get graphql-inspector to work on my repo. I have enabled the app for my repo, and added the following in my main.workflow:

workflow "On Push" {
  on = "push"
  resolves = "Check GraphQL with Inspector"
}

workflow "On Pull Request" {
  on = "pull_request"
  resolves = "Check GraphQL with Inspector"
}

# Deploy and Host GraphQL Inspector
action "Check GraphQL with Inspector" {
  uses = "kamilkisiela/[email protected]"
  secrets = ["GITHUB_TOKEN"]
}

package.json:

 "graphql-inspector": {
    "diff": true,
"schema": {
      "ref": "head/master",
      "path": "new.graphql"
    }
}

action debug output:

[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4
01:10:02.143Z DEBUG probot: Webhook received
  event: {
    "event": "push",
    "id": "b9bf6af5-60e7-4192-9dfc-d6fbd7d1b597",
    "repository": "steebchen/test-actions"
  }
01:10:02.171Z  INFO event: GraphQL Inspector started (action: gh-action) - steebchen/test-actions#a17c5c7e3f02ea70c7690f0e34e8d2797e5f4fa6 (id=b9bf6af5-60e7-4192-9dfc-d6fbd7d1b597)
01:10:02.521Z DEBUG github: GitHub request: GET /app/installations - 401 undefined (installation=undefined)
  params: {
    "per_page": 100,
    "baseUrl": "https://api.github.com",
    "request": {
      "timeout": 0
    }
  }
01:10:02.523Z ERROR probot: Your private key (usually a .pem file) is not correct. Go to https://github.com/settings/apps/YOUR_APP and generate a new PEM file. If you're deploying to Now, visit https://probot.github.io/docs/deployment/#now.
  HttpError: {"message":"A JSON web token could not be decoded","documentation_url":"https://developer.github.com/v3"}
      at response.text.then.message (/usr/local/share/.config/yarn/global/node_modules/@octokit/rest/lib/request/request.js:72:19)
      at process._tickCallback (internal/process/next_tick.js:68:7)
01:10:02.762Z DEBUG github: GitHub request: POST https://api.github.com/repos/steebchen/test-actions/check-runs - 201 Created (installation=undefined)
  params: {
    "name": "graphql-inspector",
    "started_at": "2019-03-17T01:10:02.172Z",
    "head_sha": "a17c5c7e3f02ea70c7690f0e34e8d2797e5f4fa6",
    "status": "in_progress",
    "baseUrl": "https://api.github.com",
    "request": {
      "timeout": 0
    }
  }
01:10:02.763Z  INFO event: [check-start] sent - steebchen/test-actions#a17c5c7e3f02ea70c7690f0e34e8d2797e5f4fa6 (id=b9bf6af5-60e7-4192-9dfc-d6fbd7d1b597)
01:10:03.546Z DEBUG github: GitHub request: POST /graphql - 200 OK (installation=undefined)
  params: {
    "baseUrl": "https://api.github.com",
    "query": "\n    query GetFile($repo: String!, $owner: String!, $expression: String!) {\n      repository(name: $repo, owner: $owner) {\n        object(expression: $expression) {\n          ... on Blob {\n            text\n          }\n        }\n      }\n    }\n  ",
    "variables": {
      "repo": "test-actions",
      "owner": "steebchen",
      "expression": "a17c5c7e3f02ea70c7690f0e34e8d2797e5f4fa6:package.json"
    },
    "request": {
      "timeout": 0
    }
  }
01:10:04.572Z DEBUG github: GitHub request: POST /graphql - 200 OK (installation=undefined)
  params: {
    "baseUrl": "https://api.github.com",
    "query": "\n    query GetFile($repo: String!, $owner: String!, $expression: String!) {\n      repository(name: $repo, owner: $owner) {\n        object(expression: $expression) {\n          ... on Blob {\n            text\n          }\n        }\n      }\n    }\n  ",
    "variables": {
      "repo": "test-actions",
      "owner": "steebchen",
      "expression": "head/master:new.graphql"
    },
    "request": {
      "timeout": 0
    }
  }
01:10:04.575Z ERROR event: Cannot read property 'text' of null (id=b9bf6af5-60e7-4192-9dfc-d6fbd7d1b597)
  TypeError: Cannot read property 'text' of null
      at /usr/local/share/.config/yarn/global/node_modules/@graphql-inspector/github/dist/probot.js:57:72
      at step (/usr/local/share/.config/yarn/global/node_modules/@graphql-inspector/github/dist/probot.js:32:23)
      at Object.next (/usr/local/share/.config/yarn/global/node_modules/@graphql-inspector/github/dist/probot.js:13:53)
      at fulfilled (/usr/local/share/.config/yarn/global/node_modules/@graphql-inspector/github/dist/probot.js:4:58)
      at process._tickCallback (internal/process/next_tick.js:68:7)
  --
  event: {
    "event": "push",
    "id": "b9bf6af5-60e7-4192-9dfc-d6fbd7d1b597",
    "repository": "steebchen/test-actions"
  }

### FAILED Check GraphQL with Inspector 01:10:09Z (26.333s)

What can I do to fix it? Thanks in advance!

Validate complains about fragments (false negative)

I am not really sure what to think about this. For example I have a simple file WareUnitFragment.graphql.ts with this content.

import gql from 'graphql-tag'

export const WareUnitFragment = gql`
  fragment GWareUnit on WareUnit {
    id
    enum
    code
  }
`

Running the validate for that file outputs...

error in src/segments/menu/graph/WareUnitFragment.graphql.ts:

 - There can be only one fragment named GWareUnit.
 - Fragment GWareUnit is never used.
 - Fragment GAddress is never used.
 - Fragment GCustomer is never used.
 - Fragment GEmail is never used.
 ...

It lists all fragments used in the app. And this goes on for every file including fragments

Build Issues

Hello,

I tried to build the solution on my local machine (MacBook Pro) and could not. I suppose, I am missing a build step but I cannot find out any documentation in the readme.md to guide me.

Steps:
1- Get the code with git clone https://github.com/kamilkisiela/graphql-inspector.git graphqlinspector
2- yarn install
3- yarn build

I am getting many ERR! yarn run build

image

I also tried to run yarn run build:github without better success. This time getting over 60 TypeScript errors.

Finally, I find out a Dockerfile, I tried docker build . It ran without issue but there is no container running, neither file compiled.

It would help people to have some instructions on how to build the project.

CoreJS Error

I am getting an error when trying to run the inspector.

$ graphql-inspector diff https://api.gigsmart.com/graphql/worker https://api.dev.gigsmart.com/graphql/worker
Error: Cannot find module 'core-js/proposals/array-flat-and-flat-map'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:609:15)
    at Function.Module._load (internal/modules/cjs/loader.js:535:25)
    at Module.require (internal/modules/cjs/loader.js:663:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/Users/jwaldrip/.asdf/installs/nodejs/11.9.0/.npm/lib/node_modules/@graphql-inspector/cli/node_modules/apollo-env/src/polyfills/array.ts:1:1)
    at Module._compile (internal/modules/cjs/loader.js:734:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:745:10)
    at Module.load (internal/modules/cjs/loader.js:626:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:566:12)
    at Function.Module._load (internal/modules/cjs/loader.js:558:3)

graphql-toolkit's loadSchema require non-null value (options)

The following line is currently passing null into loadSchema, but graphql-toolkit's URL handler expects to be able to look in there for a 'headers' property (see https://github.com/ardatan/graphql-toolkit/blob/master/src/loaders/schema/introspection-from-url.ts#L18):

https://github.com/kamilkisiela/graphql-inspector/blob/master/packages/load/src/schema/index.ts#L32

This results in the following error:
error Cannot read property 'headers' of null

Definitions in introspected schema are being pretty printed

Hi!

I'm comparing two schemas: one loaded from disk, one introspected from our endpoint. Even if they're both using identical schemas, I'm seeing differences due to newlines being added in type definition comments.

It turns out that the issue is with this process: https://github.com/kamilkisiela/graphql-inspector/blob/master/packages/load/src/schema/index.ts#L18 - the printSchema function is (I think) doing some pretty printing on long comments, which means that they can't be compared to the original.

I'm not sure what the best route to fix it would be, except maybe amending the graphql printSchema function to make pretty printing optional?

Cheers,
Mike

Allow configuration through yaml file

I use Go for my GraphQL server and would like to make use of graphql-inspector, but I don't have a package.json there.

It would be great if options could be specified with a yaml file in the .github folder (.github/graphql-inspector.yml), which now seems more and more the go-to approach, especially with github actions.

Error: was filtered because it contains an invalid GraphQL schema definition

Hello,

I have a running client that consume a GraphQL service. I can query without any issue. I am trying to use the graphql-inspector but this one keeps saying:

was filtered because it contains an invalid GraphQL schema definition

I am using:

./node_modules/.bin/graphql-inspector validate ./src/**/*.{ts,tsx} ./graphql/allSchema.graphql

and the result is

File "./src/Shared/ContainerComponents/GraphQLExperimentation1.tsx" was filtered because it contains an invalid GraphQL schema definition!
File "./src/Shared/ContainerComponents/GraphQLExperimentation2.tsx" was filtered because it contains an invalid GraphQL schema definition!

error All found files for glob expression "./src/**/*.tsx" are not valid or empty, please check it and try again!

It would be helpful to know what "invalid" means? Meanwhile, is there an option to get further detail because from my perspective the schema is valid. The VSCode extension (GraphQL for VSCode) uses the static file ./graphql/allSchema.graphql and does not detect any issue. The execution of the query is also flawless.

The two .tsx files are different. The first one uses:

const result: ApolloQueryResult<Proto.Query> = await this.client.query<Proto.Query>({
query: gql`
                   query Proto {
                       entityA(id: 1) {
                           name
                           id
                       }
                   }
               `
        });

The second one use:

<Query
    query={gql`
        query Proto2 {
            entityA(id: 1) {
                name
                id
            }
        }
    `}
>

Thank you in advance.

Set Access-Control-Allow-Origin on the server, or allow setting it via CLI

Hello there and thanks for the awesome tool!

I was trying to use graphql-inspector serve on my local application as a way of doing a layman's chaos testing session. To get it to work I had to go into the bundled code and change:

headers: options.headers,

to this:

headers: { ...options.headers, 'Access-Control-Allow-Origin': '*' },

The variable being called options makes me thing it's configurable via the programmatic @graphql-inspector/core, but I think it should be possible to set it via CLI too.

What do you think?

interface support in coverage

If client code requests field on interface type like:

interface Amountable {
  amount: Int!
}
type X implements Amountable {
  id: ID!
  amount: Int!
}

# client 
fragment amountable on Amountable  {
  amount
  ... on X {
     id
  }
}

this line falls: https://github.com/kamilkisiela/graphql-inspector/blob/master/packages/core/src/coverage/index.ts#L65
because coverage.types is not populated with interface Amountable

proposed fix:

// packages/core/src/coverage/index.ts#L81
       if (isObjectType(type) || isInterfaceType(type)) {

install warning: none of graphql version is installed.

I get these WARN when install graphql-inspector globally, and because lib graphql is not installed, so exec any command will throw error: Error: Cannot find module 'graphql'

 /usr/local/lib/node_modules ๎‚ฐ npm install -g graphql-inspector                                                                   ๎‚ฒ โœ”
/usr/local/bin/graphql-inspector -> /usr/local/lib/node_modules/graphql-inspector/dist/cli.js

> [email protected] postinstall /usr/local/lib/node_modules/graphql-inspector/node_modules/protobufjs
> node scripts/postinstall

npm WARN [email protected] requires a peer of graphql@^0.13.0 || ^14.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of graphql@^0.12.0 || ^0.13.0 || ^14.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of graphql@^0.12.0 || ^0.13.0 || ^14.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of graphql@^0.10.5 || ^0.11.3 || ^0.12.0 || ^0.13.0 || ^14.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of graphql@^0.12.0 || ^0.13.0 || ^14.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of graphql@^0.13.0 || ^14.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @apollographql/[email protected] requires a peer of graphql@^0.13.1 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of graphql@^0.12.0 || ^0.13.0 || ^14.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of graphql@^0.12.0 || ^0.13.0 || ^14.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of graphql@^0.12.0 || ^0.13.0 || ^14.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of [email protected] - 14.0.x but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of graphql@^0.12.0 || ^0.13.0 || ^14.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of graphql@^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of graphql@^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.1 || ^14.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of graphql@^0.11.3 || ^0.12.3 || ^0.13.0 || ^14.0.0 but none is installed. You must install peer dependencies yourself.

+ [email protected]
added 177 packages in 30.051s
 /usr/local/lib/node_modules ๎‚ฐ node -v                                                                                            ๎‚ฒ โœ”
v8.11.3
 /usr/local/lib/node_modules ๎‚ฐ npm -v                                                                                             ๎‚ฒ โœ”
5.6.0
 /usr/local/lib/node_modules ๎‚ฐ

Empty type throws error

Whenever the schema has an empty type, like

type Car {

}

The inspector throws:

error Must provide Source. Received: {}

Is this the expected behavior?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.