@frogbotai/next, so there’s nothing to install.
Add the routes
Create the GraphQL endpoint:src/app/(frogbot)/api/graphql/route.ts
src/app/(frogbot)/api/graphql-playground/route.ts
/api/graphql, and the playground is at /api/graphql-playground:
OPTIONS export answers CORS preflight requests with the same headers as your REST routes.
If you change routes.graphQL or routes.graphQLPlayground in your FrogBot config, rename the route folders to match. For example, routes: { graphQL: '/gql' } needs src/app/(frogbot)/api/gql/route.ts.
Production defaults
In production, the playground returns 404 and introspection queries are rejected. Regular queries and mutations keep working. To turn either back on, setgraphQL.disablePlaygroundInProduction or graphQL.disableIntrospectionInProduction to false in your FrogBot config. See GraphQL options.
Turn GraphQL off
SetgraphQL.disable: true to make /api/graphql return 404. This setting doesn’t remove the playground page in development, so delete the graphql-playground route file as well if you don’t want it served. To remove GraphQL completely, delete both route files.
What’s in the schema
The schema includes your collections and FrogBot’s public built-in collections, such aschats and messages. A files collection appears when your app marks one with file: true. FrogBot’s internal collections (chat turns, chat assets, trigger subscriptions, and durable waits) and internal records such as admin preferences, document locks, jobs, and key-value storage aren’t part of it.
To write the schema to a file for frontend code generation, see GraphQL schema.