Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restructuring of Type Definition API #134

Closed
leebyron opened this issue Aug 18, 2015 · 2 comments
Closed

Restructuring of Type Definition API #134

leebyron opened this issue Aug 18, 2015 · 2 comments

Comments

@leebyron
Copy link
Contributor

This task seeks to track all feedback on the GraphQL type definition API. Once enough feedback has been collected to project a clear course of action, a new type definition API will be proposed, and implemented in a following major version with clear instructions for moving along existing code.

@AlicanC
Copy link

AlicanC commented Mar 13, 2016

As stated in #130, the way types are exported is problematic:

import {
  GraphQLObjectType,
  GraphQLNonNull,
  GraphQLString,
} from 'graphql';

graphql-js should export a Types object which contains all the types without the "GraphQL" prefix:

import { Types as GqlTypes } from 'graphql';

// GqlTypes.ObjectType
// GqlTypes.NonNull
// GqlTypes.String

We can add the "Types" export without breaking 0.4 and remove prefixed types in 0.5.

@IvanGoncharov
Copy link
Member

I think we stabilize our Type Definition API enough over the last 3 years.
So if someone wants to report any issue with it should be reported separately.

As for having separate Types I think schema definition methods are shifting towards SDL and GraphQL* classes as the internal mechanism and for advanced scenarios.

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

No branches or pull requests

3 participants