Skip to content

Commit

Permalink
docs(examples): update deps and fix runtime issues
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalLytek committed May 10, 2023
1 parent 57c37ce commit c5c3ffa
Show file tree
Hide file tree
Showing 66 changed files with 14,477 additions and 40,910 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ coverage

# parcel cache
.cache
.parcel-cache

# sponsorkit cache
img/.cache.json
Expand Down
2 changes: 2 additions & 0 deletions examples/apollo-cache/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ import "reflect-metadata";
import { ApolloServer } from "apollo-server";
import { ApolloServerPluginCacheControl } from "apollo-server-core";
import responseCachePlugin from "apollo-server-plugin-response-cache";
import path from "path";
import { buildSchema } from "../../src";

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

async function bootstrap() {
const schema = await buildSchema({
resolvers: [RecipeResolver],
emitSchemaFile: path.resolve(__dirname, "schema.gql"),
});

const server = new ApolloServer({
Expand Down
24 changes: 24 additions & 0 deletions examples/apollo-cache/schema.gql
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# -----------------------------------------------
# !!! THIS FILE WAS GENERATED BY TYPE-GRAPHQL !!!
# !!! DO NOT MODIFY THIS FILE BY YOURSELF !!!
# -----------------------------------------------

"""
The javascript `Date` as string. Type represents date and time as the ISO Date string.
"""
scalar DateTime

type Query {
cachedRecipe(title: String!): Recipe
recipe(title: String!): Recipe
recipes: [Recipe!]!
}

type Recipe {
averageRating: Float
cachedAverageRating: Float
creationDate: DateTime!
description: String
ratings: [Int!]!
title: String!
}
Binary file removed examples/apollo-client/.parcel-cache/data.mdb
Binary file not shown.
Binary file removed examples/apollo-client/.parcel-cache/lock.mdb
Binary file not shown.
Loading

0 comments on commit c5c3ffa

Please sign in to comment.