Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions src/content/code/language-support/javascript/tools/giraphql.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: GiraphQL
description: A plugin based schema builder for creating code-first GraphQL schemas in typescript
url: https://giraphql.com/
github: hayes/giraphql
npm: "@giraphql/core"
---

GiraphQL makes writing type-safe schemas simple, and works without a code generator,
build process, or extensive manual type definitions.

```ts
import { ApolloServer } from "apollo-server"
import SchemaBuilder from "@giraphql/core"

const builder = new SchemaBuilder({})

builder.queryType({
fields: t => ({
hello: t.string({
args: {
name: t.arg.string({}),
},
resolve: (parent, { name }) => `hello, ${name || "World"}`,
}),
}),
})

new ApolloServer({
schema: builder.toSchema({}),
}).listen(3000)
```