@pvh-afl/graphql
v1.2.60
Published
AFL GraphQL - Shared GraphQL modules for multi-brand commerce platform
Readme
@pvh-afl/graphql
Shared GraphQL modules for the AFL multi-brand commerce platform.
Installation
npm install @pvh-afl/graphqlPeer Dependencies
This package requires the following peer dependencies:
npm install @pvh-afl/core @nestjs/common @nestjs/core @nestjs/graphql @nestjs/apollo graphqlModules
ProductModule
Product queries and services for fetching product data from commerce platforms.
import { ProductModule } from '@pvh-afl/graphql';
@Module({
imports: [ProductModule],
})
export class AppModule {}CartModule
Cart mutations and services for managing shopping carts.
import { CartModule } from '@pvh-afl/graphql';CollectionModule
Collection queries for fetching product collections.
import { CollectionModule } from '@pvh-afl/graphql';ServiceabilityModule
Serviceability checks for delivery availability.
import { ServiceabilityModule } from '@pvh-afl/graphql';PageContentModule
CMS page content fetching and processing.
import { PageContentModule } from '@pvh-afl/graphql';ProductContentModule
Product-specific CMS content.
import { ProductContentModule } from '@pvh-afl/graphql';HeaderModule
Header configuration and navigation.
import { HeaderModule } from '@pvh-afl/graphql';CmsModule
Generic CMS content fetching.
import { CmsModule } from '@pvh-afl/graphql';Usage with NestJS GraphQL
Import the modules you need in your application module:
import { Module } from '@nestjs/common';
import { GraphQLModule } from '@nestjs/graphql';
import { ApolloDriver, ApolloDriverConfig } from '@nestjs/apollo';
import {
ProductModule,
CartModule,
CollectionModule,
ServiceabilityModule,
PageContentModule,
HeaderModule,
} from '@pvh-afl/graphql';
@Module({
imports: [
GraphQLModule.forRoot<ApolloDriverConfig>({
driver: ApolloDriver,
autoSchemaFile: true,
}),
ProductModule,
CartModule,
CollectionModule,
ServiceabilityModule,
PageContentModule,
HeaderModule,
],
})
export class AppModule {}API Reference
See the API documentation for detailed usage information.
Development
# Build the package
npm run build
# Run tests
npm test
# Run linting
npm run lintLicense
UNLICENSED - Private package
