@nestjs/graphql
Version:
GraphQL for NestJS: code-first and schema-first APIs, resolvers as providers, subscriptions, federation and generated SDL, on Apollo or Mercurius.
11 lines (10 loc) • 327 B
JavaScript
import { isObject, isString } from '@nestjs/common/utils/shared.utils.js';
export function getPathForAutoSchemaFile(autoSchemaFile) {
if (isString(autoSchemaFile)) {
return autoSchemaFile;
}
if (isObject(autoSchemaFile) && autoSchemaFile.path) {
return autoSchemaFile.path;
}
return null;
}