Skip to content

Commit

Permalink
Remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
kitten committed Mar 28, 2024
1 parent d13dbb8 commit 6c5a944
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions packages/cli-utils/src/tada.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { promises as fs } from 'node:fs';
import path from 'node:path';
import type { IntrospectionQuery } from 'graphql';
import type { SchemaLoader } from '@gql.tada/internal';

import {
type SchemaOrigin,
Expand Down Expand Up @@ -50,15 +49,3 @@ export async function ensureTadaIntrospection(
console.error('Something went wrong while writing the introspection file', error);
}
}

export function makeLoader(root: string, origin: SchemaOrigin): SchemaLoader {
const urlOrigin = getURLConfig(origin);
if (urlOrigin) {
return loadFromURL(urlOrigin);
} else if (typeof origin === 'string') {
const file = path.resolve(root, origin);
return loadFromSDL({ file, assumeValid: true });
} else {
throw new Error(`Configuration contains an invalid "schema" option`);
}
}

0 comments on commit 6c5a944

Please sign in to comment.