Welcome to the home of the Hot Chocolate GraphQL server for .NET, the Strawberry Shake GraphQL client for .NET and Nitro the awesome Monaco based GraphQL IDE.
Installations
npm install @chillicream/bananacakepop-server-adapter-plugin
Developer Guide
Typescript
Yes
Module System
ESM
Min. Node Version
>=12
Node Version
18.19.1
NPM Version
10.2.4
Score
67.1
Supply Chain
95.4
Quality
82.4
Maintenance
100
Vulnerability
92
License
Releases
Contributors
Languages
C# (97.75%)
TypeScript (1.63%)
HTML (0.46%)
JavaScript (0.12%)
Shell (0.01%)
PowerShell (0.01%)
CSS (0.01%)
Developer
Download Statistics
Total Downloads
1,267
Last Day
1
Last Week
5
Last Month
38
Last Year
1,267
GitHub Statistics
5,338 Stars
4,157 Commits
755 Forks
79 Watching
209 Branches
314 Contributors
Bundle Size
3.10 kB
Minified
1.36 kB
Minified + Gzipped
Package Meta Information
Latest Version
18.0.0
Package Id
@chillicream/bananacakepop-server-adapter-plugin@18.0.0
Unpacked Size
25.72 kB
Size
5.55 kB
File Count
7
NPM Version
10.2.4
Node Version
18.19.1
Publised On
06 Oct 2024
Total Downloads
Cumulative downloads
Total Downloads
1,267
Last day
0%
1
Compared to previous day
Last week
-44.4%
5
Compared to previous week
Last month
-19.1%
38
Compared to previous month
Last year
0%
1,267
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Peer Dependencies
2
Banana Cake Pop Server Adapter Plugin
Server Adapter Plugin for Banana Cake Pop GraphQL IDE
Description
This plugin allows to setup Banana Cake Pop GraphQL IDE for your GraphQL Yoga server or any other server that implements the Server Adapter (see @whatwg-node
).
You can use a cdn hosted version of the app or a self hosted version using the ad hoc package.
Installation
Install this package and the required peerDependencies
in your project:
1npm install @chillicream/bananacakepop-server-adapter-plugin --save-dev 2# or 3yarn add @chillicream/bananacakepop-server-adapter-plugin --dev 4# or 5pnpm add @chillicream/bananacakepop-server-adapter-plugin --save-dev
Note: @chillicream/bananacakepop-graphql-ide
is optional and only needed if you prefer to self host the app.
Usage
Add the plugin to your server.
1import { useBananaCakePop } from "@chillicream/bananacakepop-server-adapter-plugin"; 2import { createYoga } from "graphql-yoga"; 3import { createServer } from "node:http"; 4 5const yoga = createYoga({ 6 schema: // Schema omitted for brevity, 7 plugins: [useBananaCakePop()], // Adds Banana Cake Pop 8 graphiql: false, // Disables the default GraphQL IDE 9}); 10 11const server = createServer(yoga); 12 13server.listen(3000, () => { 14 console.log("Running a GraphQL API server at http://localhost:3000/graphql"); 15});
Extended configuration
-
To pin a specific version instead of using "latest":
1useBananaCakePop({ 2 mode: "cdn", 3 target: { version: "x.0.0" }, 4});
-
To use your own infrastructure:
1useBananaCakePop({ 2 mode: "cdn", 3 target: "https://mycompany.com/bcp", 4});
Custom options
-
To pass
options
supported by Banana Cake Pop GraphQL IDE:1useBananaCakePop({ 2 mode: "cdn", 3 options: { 4 title: "BCP", 5 }, 6});
Recipes
🔗 With graphql-yoga
1import { useBananaCakePop } from "@chillicream/bananacakepop-server-adapter-plugin"; 2import { createYoga } from "graphql-yoga"; 3import { createServer } from "node:http"; 4 5const yoga = createYoga({ 6 schema: createSchema({ 7 typeDefs: /* GraphQL */ ` 8 type Query { 9 greeting: String 10 } 11 `, 12 resolvers: { 13 Query: { 14 greeting: () => "Hello, World!", 15 }, 16 }, 17 }), 18 plugins: [useBananaCakePop()], // Adds Banana Cake Pop 19 graphiql: false, // Disables the default GraphQL IDE 20}); 21 22const server = createServer(yoga); 23 24server.listen(3000, () => { 25 console.log("Running a GraphQL API server at http://localhost:3000/graphql"); 26});
🔗 With graphql-yoga and grats
1import { useBananaCakePop } from "@chillicream/bananacakepop-server-adapter-plugin"; 2import { createYoga, createSchema } from "graphql-yoga"; 3import { createServer } from "node:http"; 4import { getSchema } from "./schema"; // Will be generated by Grats 5 6/** @gqlType */ 7type Query = unknown; 8 9/** @gqlField */ 10export function hello(_: Query): string { 11 return "Hello world!"; 12} 13 14const yoga = createYoga({ 15 schema: getSchema(), 16 plugins: [useBananaCakePop()], // Adds Banana Cake Pop 17 graphiql: false, // Disables the default GraphQL IDE 18}); 19 20const server = createServer(yoga); 21 22server.listen(3000, () => { 23 console.log("Running a GraphQL API server at http://localhost:3000/graphql"); 24});
![Empty State](/_next/static/media/empty.e5fae2e5.png)
No vulnerabilities found.
![Empty State](/_next/static/media/empty.e5fae2e5.png)
No security vulnerabilities found.