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.

Support configuring via typeDefinitions

See original GitHub issue

See example here

https://github.com/tonyxiao/eslint-plugin-graphql/blob/master/test/updateSchemaJson.js#L5-L11

Basically allow people to import a package which represents their server and generate a schema based on their server code. Could be either the result of graphql.buildASTSchema, a string which contains graphQL schema type definitions, or path to a .graphql file.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
tonyxiaocommented, Sep 11, 2016

Oh wait, that’s just what you were talking about earlier…

https://github.com/graphcool/graphql-config/blob/master/README.md#use-local-schema-file-graphqljs

I guess I totally misread for some reason. Closing issue then. 😃

0reactions
tonyxiaocommented, Sep 11, 2016

The advantage of configuring via an actual schema / type definitions is that you don’t need a running server somewhere and you can make sure the test you are running is always testing against the version of schema that you wrote the code for (So going back to an old commit, test wont be magically broken because API server has changed).

I imagine you have to provide an import path for us to find the module which contains the AST schema. So maybe an additional option like so?

.graphqlrc

{
  "schema": "yourpackage/schema"
}

yourpackage/schema.js

import graphql from 'graphql'

const typeDefinition = `
...
`
export default graphql.buildASTSchema(graphql.parse(typeDefinition));
Read more comments on GitHub >

github_iconTop Results From Across the Web

TSConfig Reference - Docs on every TSConfig option
ts files are type definition files which describe the external API of your module. With .d.ts files, tools like TypeScript can provide intellisense...
Read more >
TypeScript: Adding Custom Type Definitions for Existing ...
Adding a Basic Definition For A Library Using defaultExport. After the initial setup, we need to import a library. In this example we're...
Read more >
@types/config - npm
TypeScript definitions for node-config. Latest version: 3.3.0, ... Start using @types/config in your project by running `npm i @types/config`.
Read more >
TypeScript configuration - Angular
It is a superset of JavaScript with design-time support for type safety and tooling. Browsers can't execute TypeScript directly. Typescript must be "transpiled" ......
Read more >
Supported Resource Types - AWS Config
AWS Config supports the following AWS resources types and resource relationships. Some regions support a subset of these resource types.
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