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

Add documentation for the executeSync method #2941

Closed
Tracked by #3150
brybrophy opened this issue Feb 25, 2021 · 1 comment · Fixed by #4279
Closed
Tracked by #3150

Add documentation for the executeSync method #2941

brybrophy opened this issue Feb 25, 2021 · 1 comment · Fixed by #4279

Comments

@brybrophy
Copy link

My company recently discovered the undocumented executeSync method that is exposed in graphql-js. We would like to use it to synchronously generate schema based mock data for our tests, however, we are wary of using an undocumented API.

Is this method intended for internal use only, or is it safe to assume that no breaking changes will be introduced? If this method is safe for external users to consume, it would be great to add it to the documentation.

@brybrophy
Copy link
Author

Actually, it seems that all of these exports from execution/index are undocumented. So I would like to extend my question to ask if these are all intended for external consumption.

graphql-js/src/index.js

Lines 277 to 285 in 735975d

// Execute GraphQL queries.
export {
execute,
executeSync,
defaultFieldResolver,
defaultTypeResolver,
responsePathAsArray,
getDirectiveValues,
} from './execution/index';

@saihaj saihaj mentioned this issue May 30, 2021
21 tasks
JoviDeCroock added a commit that referenced this issue Nov 2, 2024
JoviDeCroock added a commit that referenced this issue Nov 4, 2024
Ultimately I was trying this out to see whether we can tweak the docs
easily, it made me realize that our docs are tailored to general GraphQL
rather than how do we use this library. It made me come up with a few
suggestions

- We should have a toggle on code examples to switch between
`buildSchema` and programatically creating the schema with i.e.
`GraphQLObjectType`
- Our documentation starts with a tutorial, this ultimately feels like a
mistake, we should lead with an explanation of what GraphQL.JS is and
what it aims to do, clearly outlining the goals of this project
- We should line out use-cases for building on this library and best
practices of how to go to production

Resolves #2941 
Resolves #2567
yaacovCR pushed a commit to yaacovCR/graphql-js that referenced this issue Nov 26, 2024
Ultimately I was trying this out to see whether we can tweak the docs
easily, it made me realize that our docs are tailored to general GraphQL
rather than how do we use this library. It made me come up with a few
suggestions

- We should have a toggle on code examples to switch between
`buildSchema` and programatically creating the schema with i.e.
`GraphQLObjectType`
- Our documentation starts with a tutorial, this ultimately feels like a
mistake, we should lead with an explanation of what GraphQL.JS is and
what it aims to do, clearly outlining the goals of this project
- We should line out use-cases for building on this library and best
practices of how to go to production

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

Successfully merging a pull request may close this issue.

2 participants