GraphQL Yoga v3 documentation (superseded by v5): Google Cloud Platform (GCP) is a suite of cloud computing services powered by Google. It is easy to use GraphQL Yoga with GCP.
Google Cloud Platform (GCP) is a suite of cloud computing services powered by Google. It is easy to
use GraphQL Yoga with GCP.
Installation
npm i graphql
yarn add graphql
pnpm add graphql
bun add graphql
npm i graphql-yoga
yarn add graphql-yoga
pnpm add graphql-yoga
bun add graphql-yoga
Usage
import { createSchema, createYoga } from 'graphql-yoga'export const graphql = createYoga({ schema: createSchema({ typeDefs: /* GraphQL */ ` type Query { greetings: String } `, resolvers: { Query: { greetings: () => 'This is the `greetings` field of the root `Query` type' } } }), graphqlEndpoint: '*'})
You can also check a full example on our GitHub repository
here
This site uses cookies for analytics and improving your experience.