How to use the apollo-server-core.defaultPlaygroundOptions.settings function in apollo-server-core

To help you get started, we’ve selected a few apollo-server-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github alitelabs / tyx / src / core / graphql.ts View on Github external
protected async playground(ctx: Context, req: HttpRequest, custom?: Partial): Promise {
    const sufix = ctx.auth.token ? ('/' + ctx.auth.token) : '';
    const options = createPlaygroundOptions({
      endpoint: `${this.config.prefix || ''}/graphql${sufix}`,
      settings: {
        'editor.fontSize': 12,
        'editor.fontFamily': `'Menlo', ${defaultPlaygroundOptions.settings["editor.fontFamily"]}`,
        'editor.theme': 'light'
      },
      // workspaceName: 'SmokeTest',
      // config: {
      //   schemaPath: "schema.graphql",
      //   extensions: {
      //     endpoints: {
      //       dev: {
      //         url: `${this.config.prefix || ''}/graphql`,
      //         headers: {
      //           Authorization: `Bearer ${ctx.auth.token}`
      //         }
      //       }
      //     }
      //   }
      // },