Skip to content

Commit b8a59d0

Browse files
committed
docs(examples): update deps and fix runtime issues
1 parent 57c37ce commit b8a59d0

File tree

66 files changed

+14474
-40907
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+14474
-40907
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ coverage
1313

1414
# parcel cache
1515
.cache
16+
.parcel-cache
1617

1718
# sponsorkit cache
1819
img/.cache.json

examples/apollo-cache/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@ import "reflect-metadata";
22
import { ApolloServer } from "apollo-server";
33
import { ApolloServerPluginCacheControl } from "apollo-server-core";
44
import responseCachePlugin from "apollo-server-plugin-response-cache";
5+
import path from "path";
56
import { buildSchema } from "../../src";
67

78
import { RecipeResolver } from "./recipe-resolver";
89

910
async function bootstrap() {
1011
const schema = await buildSchema({
1112
resolvers: [RecipeResolver],
13+
emitSchemaFile: path.resolve(__dirname, "schema.gql"),
1214
});
1315

1416
const server = new ApolloServer({

examples/apollo-cache/schema.gql

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# -----------------------------------------------
2+
# !!! THIS FILE WAS GENERATED BY TYPE-GRAPHQL !!!
3+
# !!! DO NOT MODIFY THIS FILE BY YOURSELF !!!
4+
# -----------------------------------------------
5+
6+
"""
7+
The javascript `Date` as string. Type represents date and time as the ISO Date string.
8+
"""
9+
scalar DateTime
10+
11+
type Query {
12+
cachedRecipe(title: String!): Recipe
13+
recipe(title: String!): Recipe
14+
recipes: [Recipe!]!
15+
}
16+
17+
type Recipe {
18+
averageRating: Float
19+
cachedAverageRating: Float
20+
creationDate: DateTime!
21+
description: String
22+
ratings: [Int!]!
23+
title: String!
24+
}
-17.5 MB
Binary file not shown.
-8.08 KB
Binary file not shown.

0 commit comments

Comments
 (0)