Skip to content

buildSchema helper function#471

Merged
leebyron merged 2 commits into
graphql:masterfrom
lacker:build-schema
Aug 25, 2016
Merged

buildSchema helper function#471
leebyron merged 2 commits into
graphql:masterfrom
lacker:build-schema

Conversation

@lacker

@lacker lacker commented Aug 25, 2016

Copy link
Copy Markdown

Pretty simple - this just adds a buildSchema function that composes buildASTSchema and parse, as mentioned in the discussion on #469 . This makes a "hello world" experience one notch simpler; product developers can use this mechanism to build their schemas while ignoring the intermediate ast format altogether.

@ghost ghost added the CLA Signed label Aug 25, 2016
Comment thread src/utilities/buildASTSchema.js Outdated
import { valueFromAST } from './valueFromAST';
import { TokenKind } from '../language/lexer';
import { parse } from '../language/parser';
import { Source } from '../language/source';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import type { Source } since this is only being used for flow types

@leebyron

Copy link
Copy Markdown
Contributor

Sweet! Super simple

@lacker

lacker commented Aug 25, 2016

Copy link
Copy Markdown
Author

Fixed your feedback.

@leebyron leebyron merged commit 7e8e57b into graphql:master Aug 25, 2016
@leebyron

Copy link
Copy Markdown
Contributor

Boom

@nishp1

nishp1 commented Aug 27, 2016

Copy link
Copy Markdown

🎉 🎉 This is huge. Thanks @lacker @leebyron.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants