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

Yoga options redesign #71

Closed
kbrandwijk opened this issue Jan 4, 2018 · 0 comments · Fixed by #77
Closed

Yoga options redesign #71

kbrandwijk opened this issue Jan 4, 2018 · 0 comments · Fixed by #77
Labels
kind/discussion Discussion, question or feedback

Comments

@kbrandwijk
Copy link
Contributor

Yoga options redesign

Currently, yoga has the following options:

typeDefs?: string
resolvers?: IResolvers
schema?: GraphQLSchema
context?: Context | ContextCallback
cors?: CorsOptions | false
disableSubscriptions?: boolean
tracing?: boolean | TracingOptions
port?: number
endpoint?: string
subscriptionsEndpoint?: string
playgroundEndpoint?: string
disablePlayground?: boolean
uploads?: UploadOptions

These options can all be passed in to the constructor of the server.
Then there are the following apollo-server options that are not available yet:

rootValue?
formatError?
validationRules?
formatParams?
formatResponse?

Looking at these options, there are basically three categories of options:

  1. Server options
    • cors
    • port
    • routes:
      • endpoint?: string
      • subscriptionsEndpoint?: string
      • playgroundEndpoint?: string
  2. GraphQL options
    • schema: GraphQLSchema | { typeDefs, resolvers }
    • context
    • runtime:
      • tracing
      • rootValue?
      • formatError?
      • validationRules?
      • formatParams?
      • formatResponse?
  3. Features
    • playground true | false
    • uploads { ... }
    • subscriptions true | false

Some of these are needed to set up the server (so at constructor time), others might be easier to set when starting the server (after applying your own logic). I'm not really sure yet how that division should work. I'll update this issue with more ideas. Please share your feedback too!

@kbrandwijk kbrandwijk added the kind/discussion Discussion, question or feedback label Jan 4, 2018
kbrandwijk added a commit that referenced this issue Jan 5, 2018
BREAKING CHANGES: constructor and start options have changed

Closes #11, closes #16, closes #71
kbrandwijk added a commit that referenced this issue Jan 5, 2018
BREAKING CHANGES: constructor and start options have changed

Closes #11, closes #16, closes #71
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/discussion Discussion, question or feedback
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant