npm

@labdigital/commercetools-federated-schema
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

Commercetools Schema Federation

Installation

yarn add @labdigital/commercetools-federated-schema

Usage

import { createCommercetoolsSchema } from '@labdigital/commercetools-federated-schema';

let commercetoolsSchema: GraphQLSchema;

export const getCommercetoolsSchema = () => {
  if (!commercetoolsSchema) {
    commercetoolsSchema = createCommercetoolsSchema({
      endpoint: `${process.env.CT_API_URL}/${process.env.CT_PROJECT_KEY}/graphql`,
      transforms: transforms,
      typeDefs: [commercetoolsTypeDefs],
      resolvers: [commercetoolsResolvers],
    });
  }
  return commercetoolsSchema;
};

/@labdigital/commercetools-federated-schema/

    Package Sidebar

    Install

    npm i @labdigital/commercetools-federated-schema

    Weekly Downloads

    0

    Version

    0.0.3

    License

    MIT

    Unpacked Size

    788 kB

    Total Files

    20

    Last publish

    Collaborators

    • korsvanloon
    • pimvernooij
    • mvantellingen
    • blurrah
    • bramkaashoek