Important
The GraphQL Codegen preset requires a patch to enable it to work with recursive queries. Make sure to run this command after every update to ensure you're using the latest patches: yarn opti-graph patches:apply
. Adjust when used in a mono-repo to patch the correct package.json, for example: yarn workspace frontend opti-graph patches:apply -p ../../
This repository contains the SDKs created by Remko Jantzen and maintained in collaboration with the community to use Optimizely products within Javascript. Though a few of these SDKs are generic, the focus is on Next.JS as framework. See the GitHub releases page for the latest updates.
If you find a bug, or have a feature request, please report it as an issue or contribute your fix/enhancement as a Pull request.
Package | Focus | Purpose |
---|---|---|
@remkoj/optimizely-cms-api | Generic | Wrapper around the Optimizely SaaS CMS Rest API |
@remkoj/optimizely-cms-cli | Generic | A CLI Tool (opti-cms ) providing developer productivity helpers for Optimizely SaaS CMS |
@remkoj/optimizely-cms-nextjs | Next.JS | Next.JS Specific components and scripts needed to implement a Next.JS based frontend for Optimizely SaaS CMS |
@remkoj/optimizely-cms-react | React | React Components and scripts needed to implement a React based frontend for Optimizely SaaS CMS |
@remkoj/optimizely-graph-cli | Generic | A CLI Tool (opti-graph ) providing developer productivity helpers for Optimizely Graph |
@remkoj/optimizely-graph-client | Generic | Provides both a wrapper around the Optimizely Graph Rest API, as well as a lightweight GraphQL client based upon graphql-request |
@remkoj/optimizely-graph-functions | Generic | Provides a preset for graphql-codegen and some default fragments that can be used to speed up the development of a frontend that leverages Optimizely Graph |
@remkoj/optimizely-one-nextjs | Next.JS | Next.JS bindings to easily integrate Optimizely products into the frontend |
Path | Contents |
---|---|
artefacts | Target folder for local builds of the packages |
dependencies | Custom builds of 3rd party packages with Optimizely CMS/Graph specific enhancements applied. These should be installed through resolutions or dependency overrides in the root package.json of your project. |
packages | Contains the source code of each of the packages |
scripts | Support scripts for the packaging & releasing process of these packages |
These SDKs rely on - but don't include or bundle - work from others. These dependencies, including their license, are disclosed in the dependency overview.
Release notes are provided on the GitHub releases page.
- Patches: Dependencies have been updated to resolve vulnerabilities
- Bug fix: Multiple pages returned when resolving content for the homepage.
- Bug fix: Fragments for Blocks that contain a content area cause errors due to incorrect recursion handling.
This includes an updated version of @graphql-codegen/visitor-plugin-common v5.6.0 in ./dependencies/ - Enhancement: JSON Files for styles (
*.opti-style.json
) and types (*.opti-type.json
) no longer have created and modified dates to reduce merge errors. - Enhancement: Handling of rich-text to auto-create missing components in the Factory to build the HTML
- Enhancement: Allowed more granular cache invalidation
- Enhancement: Improvements to Optimizely One Gadget
- Updates to support for the December 16th release of Optimizely SaaS CMS. There are no changes in the exposed APIs from these packages.
- Enhanced the error handling and parsing of
.env
files by @remkoj/optimizely-cms-cli and @remkoj/optimizely-graph-cli.
- Restored some of type exports of @remkoj/optimizely-cms-react/rsc, used by the CMS 12 compatibility script.
- Fixed generation of GraphQL Fragments for Array properties with subtype "Component"
- Updated dependencies to latest versions
- Added patched version of @graphql-codegen/visitor-plugin-common v5.6.0 in ./dependencies/