question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

example does not work

See original GitHub issue
'use strict'

const { GraphQLSchema, GraphQLObjectType, GraphQLString } = require('graphql')
const EasyGraphQLTester = require('easygraphql-tester')

const schema = new GraphQLSchema({
    query: new GraphQLObjectType({
        name: 'RootQueryType',
        fields: {
            hello: {
                type: GraphQLString,
                resolve() {
                    return 'world'
                },
            },
        },
    }),
})

const tester = new EasyGraphQLTester(schema)

Error

trofimov@trofimov-PC:~/Documents/projects/openhouse/openh/back-next$ node test.js
/home/trofimov/Documents/projects/openhouse/openh/back-next/node_modules/easygraphql-parser/node_modules/graphql/utilities/buildClientSchema.js:57
  var typeIntrospectionMap = (0, _keyMap.default)(schemaIntrospection.types, function (type) {
                                                                      ^

TypeError: Cannot read property 'types' of undefined
    at buildClientSchema (/home/trofimov/Documents/projects/openhouse/openh/back-next/node_modules/easygraphql-parser/node_modules/graphql/utilities/buildClientSchema.js:57:71)
    at schemaParser (/home/trofimov/Documents/projects/openhouse/openh/back-next/node_modules/easygraphql-parser/lib/schemaParser.js:222:28)
    at new Tester (/home/trofimov/Documents/projects/openhouse/openh/back-next/node_modules/easygraphql-tester/lib/tester.js:28:25)
    at Object.<anonymous> (/home/trofimov/Documents/projects/openhouse/openh/back-next/test.js:20:16)
    at Module._compile (internal/modules/cjs/loader.js:738:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:749:10)
    at Module.load (internal/modules/cjs/loader.js:630:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:570:12)
    at Function.Module._load (internal/modules/cjs/loader.js:562:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:801:12)

help me please

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
overpodcommented, Mar 29, 2019

I have a problem in the project. Different packages have different graphql versions. Sorry

1reaction
estrada9166commented, Mar 28, 2019

I had been trying to reproduce it but it’s not possible, I tried locally with node v11.12.0 and yarn but there was no error… can you create a repl.it or codesandbox with the exact same code and dependencies that you are testing (if it’s possible)?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use does not work in a sentence - Examples - Bab.la
Does it work? · But does it work? · But it does not work. · That does not work. · The present system...
Read more >
How to not run an example using roxygen2? - Stack Overflow
It didn't work for me first because I was using @example instead of @examples . Both tags come up in RStudio auto-complete. I'm...
Read more >
Helmet example does not work · Issue #1412 · nestjs/docs ...
The example supplied in the documentation's Security page to apply Helmet as a global middleware is wrong. If the user wishes to apply...
Read more >
NOT function - Microsoft Support
For example, the IF function performs a logical test and then returns one value if the test evaluates to TRUE and another value...
Read more >
JavaScript Common Mistakes - W3Schools
Example 1. let x = "Hello World!";. Try it Yourself ». But, breaking a statement in the middle of a string will not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found