INNER CODE UNIT · TypeScript

main

prisma-labs/get-graphql-schema · src/bin.ts:47

export async function main(cli: meow.Result): Promise<void> {
  /* Get remote endpoint from args */
  const [endpoint] = cli.input

  if (!endpoint) {
    console.warn('No endpoint provided')
    return
  }

  /* Headers */
  const defaultHeaders = {
    'Content-Type': 'application/json',
  }

  const headers = getHeadersFromInput(cli).reduce(
    (acc, { key, value }) => ({ ...acc, [key]: value }),
    defaultHeaders,
  )

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…