From e30f21f8082b93d011c79675028903acae71a75b Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Fri, 31 Dec 2021 10:18:12 +0100 Subject: [PATCH] vercel --- .gitignore | 2 ++ README.md | 13 +++++++++---- package.json | 4 ++-- pnpm-lock.yaml | 30 ++++-------------------------- svelte.config.js | 2 +- 5 files changed, 18 insertions(+), 33 deletions(-) diff --git a/.gitignore b/.gitignore index f4401a3..d6ab2fb 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,5 @@ node_modules .env .env.* !.env.example + +.vercel diff --git a/README.md b/README.md index a9341c4..2c819f5 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,17 @@ # A sane and efficient guide for consuming GraphQL endpoints in Typescript -This is the companion repo to the [blog post]() about GraphQL with Typescript. +This is the companion repo to the [blog post](https://nicco.io/blog/a-sane-and-efficient-guide-for-consuming-graphql-endpoints-in-typescript) about GraphQL with Typescript. This is skeleton [svelte kit](https://kit.svelte.dev/) app. The relevant files are: -- `.graphqlrc.yml` -- `codegen.yaml` -- `src/lib/gql` +- `.graphqlrc.yml` Editor config +- `codegen.yaml` Generator config +- `src/lib/gql` Folder where I've put the GraphQL stuff +- `src/routes/index.svelte` example usage of the generated SDK + +## Demo + +You can check a running demo here: https://blog-typescript-graphql.vercel.app ## Running diff --git a/package.json b/package.json index e97b7ac..fa3da96 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "typescript-graphql", + "name": "blog-typescript-graphql", "private": true, "type": "module", "scripts": { @@ -12,7 +12,7 @@ "@graphql-codegen/typescript": "^2.4.2", "@graphql-codegen/typescript-graphql-request": "^4.3.3", "@graphql-codegen/typescript-operations": "^2.2.2", - "@sveltejs/adapter-auto": "next", + "@sveltejs/adapter-static": "next", "@sveltejs/kit": "next", "graphql": "^15", "graphql-request": "^3.7.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8c674c6..ba48fe3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,7 +5,7 @@ specifiers: '@graphql-codegen/typescript': ^2.4.2 '@graphql-codegen/typescript-graphql-request': ^4.3.3 '@graphql-codegen/typescript-operations': ^2.2.2 - '@sveltejs/adapter-auto': next + '@sveltejs/adapter-static': next '@sveltejs/kit': next graphql: ^15 graphql-request: ^3.7.0 @@ -21,7 +21,7 @@ devDependencies: '@graphql-codegen/typescript': 2.4.2_graphql@15.8.0 '@graphql-codegen/typescript-graphql-request': 4.3.3_388f816e04241032539fce1de6ab422b '@graphql-codegen/typescript-operations': 2.2.2_graphql@15.8.0 - '@sveltejs/adapter-auto': 1.0.0-next.7 + '@sveltejs/adapter-static': 1.0.0-next.24 '@sveltejs/kit': 1.0.0-next.210_svelte@3.44.3 graphql: 15.8.0 graphql-request: 3.7.0_graphql@15.8.0 @@ -1127,34 +1127,12 @@ packages: engines: {node: '>=6'} dev: true - /@sveltejs/adapter-auto/1.0.0-next.7: - resolution: {integrity: sha512-PGuTgW6bdzKgJJy8a12OCN9ob7/I8ixfWjbBVpKpbjHGc5NmNcS70LoTU55BgVTI7ELp9VoZaJsGFoYp+X5WEw==} + /@sveltejs/adapter-static/1.0.0-next.24: + resolution: {integrity: sha512-lMiwZrZumWRrTQxaj9pFs5oW0h/97spyDl1QjmnkNaA006WeqornoETt31WpU0Lz2/2uYNXvUBBcL1LGc9Vylg==} dependencies: - '@sveltejs/adapter-cloudflare': 1.0.0-next.5 - '@sveltejs/adapter-netlify': 1.0.0-next.37 - '@sveltejs/adapter-vercel': 1.0.0-next.34 - dev: true - - /@sveltejs/adapter-cloudflare/1.0.0-next.5: - resolution: {integrity: sha512-I7kLcINJz0zik+ufb+IAWSn/EHxdTdmGF0M3tizd87Cxw2ke7N/A6XF8YrYDgZ/4yrAcZnR8Texas/5WxPYZ6g==} - dependencies: - esbuild: 0.13.15 - dev: true - - /@sveltejs/adapter-netlify/1.0.0-next.37: - resolution: {integrity: sha512-Advp53rLMsi9Kg3GYVwWFTmqzIIKCJ2WTrm2zx12Q37RrO+HaY2R+sRMGGGrjD2fk6w1qR7WR9Qt9p0n3moUbw==} - dependencies: - '@iarna/toml': 2.2.5 - esbuild: 0.13.15 tiny-glob: 0.2.9 dev: true - /@sveltejs/adapter-vercel/1.0.0-next.34: - resolution: {integrity: sha512-TQDQK2wjDQkoSkNVuFVu4a/hzqKIWCGL15Zi7zQv740ZSd6F2Lg9QHlFfEXMglu6mhoep084h6JiLtzavNiZeA==} - dependencies: - esbuild: 0.13.15 - dev: true - /@sveltejs/kit/1.0.0-next.210_svelte@3.44.3: resolution: {integrity: sha512-Lf0Kb076njOCy9OU1/BPR1gLKTJ9auSGEjaKpgmueLcuRHmnsCh5tNX738uVPQJyJBdRkCVdCdurpFKSkuSyew==} engines: {node: '>=14.13'} diff --git a/svelte.config.js b/svelte.config.js index 373c992..9422509 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -1,4 +1,4 @@ -import adapter from '@sveltejs/adapter-auto' +import adapter from '@sveltejs/adapter-static' import preprocess from 'svelte-preprocess' /** @type {import('@sveltejs/kit').Config} */