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

Docs :: GraphQLResult is not defined #1049

Open
Tracked by #3150
sgpinkus opened this issue May 9, 2021 · 2 comments
Open
Tracked by #3150

Docs :: GraphQLResult is not defined #1049

sgpinkus opened this issue May 9, 2021 · 2 comments

Comments

@sgpinkus
Copy link

sgpinkus commented May 9, 2021

Description

The API doc for the graphql() function says it returns Promise<GraphQLResult>. But GraphQLResult is not defined, and does not exist in the code base AFAICT.

Motivation

Completeness, accuracy.

@saihaj
Copy link
Member

saihaj commented May 9, 2021

Good catch. ExecutionResult is what is returned. Docs for graphql-js are outdated on this site as well as in graphql-js/docs. We are currently migrating to TypeScript. Generating docs (using ts docs or other tools) and providing more examples is next task in v16 release plan

@sgpinkus
Copy link
Author

sgpinkus commented May 9, 2021

We are currently migrating to TypeScript.

OK cool. Since then I've noticed a bunch of other inconsistencies in those docs. Like for example the docs say GraphQlSchemaConfig looks like this:

type GraphQLSchemaConfig = {
  query: GraphQLObjectType;
  mutation?: ?GraphQLObjectType;
}

when it's actually this on master:

export type GraphQLSchemaConfig = {|
  description?: ?string,
  query?: ?GraphQLObjectType,
  mutation?: ?GraphQLObjectType,
  subscription?: ?GraphQLObjectType,
  types?: ?Array<GraphQLNamedType>,
  directives?: ?Array<GraphQLDirective>,
  extensions?: ?ReadOnlyObjMapLike<mixed>,
  astNode?: ?SchemaDefinitionNode,
  extensionASTNodes?: ?$ReadOnlyArray<SchemaExtensionNode>,
  ...GraphQLSchemaValidationOptions,
|};

Since it's a wip I won't bother making anymore issues for docs. Feel free to close this if you want.

Cheers.

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