INNER CODE UNIT · TypeScript

main

maticzav/swift-graphql · server/src/index.ts:20

async function main() {
  const server = createServer<Context, any>({
    hostname: '0.0.0.0',
    schema: makeExecutableSchema({
      typeDefs,
      resolvers,
      resolverValidationOptions: {
        requireResolversToMatchSchema: 'error',
      },
    }),
    graphiql: {
      subscriptionsProtocol: 'WS',
    },
    renderGraphiQL,
    logging: true,
    maskedErrors: false,
    context: async (ctx: YogaInitialContext): Promise<Context> => {
      let user: { name: string } | null = null

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…