# @easy-cms/plugin-graphql A GraphQL API for Easy CMS: a type, queries and mutations for every collection and global, with the same access rules as REST, batched relationship loading and limits per request. Part of [Easy CMS](https://github.com/maritonx/easy-cms), the code-first CMS and app backend for Nuxt and Next.js. > [!WARNING] > **Experimental.** This package has the same version number as the rest of Easy CMS, but its options, endpoints and data may still change in a minor release, after 1.0 too: it is not covered by the [stability promise](https://easycms.dev/docs/versioning). ## Install ```bash npm install @easy-cms/plugin-graphql graphql ``` Or `pnpm add`, `yarn add` or `bun add`. ## Usage ```ts import { graphqlPlugin } from '@easy-cms/plugin-graphql' export default defineConfig({ // … plugins: [graphqlPlugin()], }) ``` ```graphql { posts(where: { title: { like: "hello" } }, sort: [createdAt_DESC], limit: 5) { docs { id title category { name } } totalDocs } } ``` Send it to `/api/cms/graphql`, or open that address in a browser for GraphiQL (outside production). ## Links [GraphQL](https://easycms.dev/docs/graphql) · [Documentation](https://easycms.dev/docs) ([ภาษาไทย](https://easycms.dev/th/docs)) · [GitHub](https://github.com/maritonx/easy-cms) MIT License