Files
TheGame/packages/backend/codegen.ts
δυς 2921a47ef0 Review: meTokens ₍wᵢₜₕ gᵣₐₙᵤₗₐᵣ 𝄴ₒₘₘᵢₜₛ₎ (#1552)
* linting 🃡

* removing MetaMask specificity 🃢

* moving `StrictMode` to Next.js 🃣

* compressing & commafying 🃤

* upgrading eslint 👘

* removing preface from guild name 🃥

* removing unnecessary ESLint `no-console` directives 🌂

* fixing a typo in a comment 🃦

* updating GraphQL codegen for paid subgraph 🦏

* replacing Discord invite link 📌

* passing through The Graph API token to Docker ♾

* setting Docker ARG to set ENV 📟

* missed a file rename in frontend Docker config 🦀

* adding ts-node to fix Docker build issue ⸙

* trying to narrow down the 500 error's source in the test instance 

* exposing The Graph API token on Cloud Run 🦃

* more logging to try & find server error 🐠

* more logging 🧱

* trying to run Node.js in development mode on Cloud Run 🎁

* reconfiguring frontend Dockerfile to also run the dev environment 🌿

* dev mode seems to function 🧨

* 768MiB wasn't enough memory 🍁

* 1GiB wasn't enough memory 🔱

* 1.5GiB was interpreted as 1GiB 🥃

* 1536MiB wasn't enough memory 👾

* 2GiB wasn't enough memory 🧲

* 3GiB wasn't enough memory 🆎

* 4GiB might have been enough, but it still doesn't load 🧻

* 5GiB requires two CPUs 📝

* giving up on dev server; unexplained HTTP 429s 🎨

* disabling Honeybadger in test instances 📮

* trying an `ErrorBoundary` to gather more info 🕷

* setting GraphQL endpoint 🇲🇰

* exposing environment variables ⛈

* trying to expose `` 📻

* the Next compiled version still references `node_modules` 🦢

* removing Alchemy API key from sources 

* trying a different Docker build action 💉

* removing logging 🍿

* switching to Docker Buildx 👠

* missed an escaped newline 🗿

* trying a newer gcloud setup action 🦝

* hopefully fixing authentication 📴

* bunch of changes to the meTokens profile section 🦜

* need credentials file 🐆

* hunting for layout load error & pushing debug statements to testing 🥁

* updating eslint 💓

* trying to debug the missing Breadchain Coop 🧀

* apparently chose the wrong changeset 🐚

* removing logging 🥀
2023-05-15 09:12:03 -06:00

98 lines
2.9 KiB
TypeScript

import dotenv from 'dotenv';
dotenv.config();
const config = {
overwrite: true,
require: ['ts-node/register'],
generates: {
'src/handlers/remote-schemas/autogen/types.ts': {
schema: 'src/handlers/remote-schemas/typeDefs.ts',
plugins: [
'typescript',
'typescript-resolvers',
{ add: { content: '/* eslint-disable */' } },
],
config: {
noSchemaStitching: true,
avoidOptionals: true,
maybeValue:
'T extends PromiseLike<infer U> ? Promise<U | null> : T | null | undefined',
},
},
'src/lib/autogen/hasura-sdk.ts': {
schema: '../../schema.graphql',
documents: ['src/handlers/graphql/**/(!(*.d)).ts'],
plugins: [
'typescript',
'typescript-operations',
'typescript-graphql-request',
{ add: { content: '/* eslint-disable */' } },
],
config: {
immutableTypes: true,
scalars: {
account_type:
"'ETHEREUM' | 'DISCORD' | 'GITHUB' | 'TWITTER' | 'DISCOURSE'",
},
dedupeOperationSuffix: true,
},
},
'src/lib/autogen/daohaus-sdk.ts': {
// DAOHaus v3 API Endpoint
// schema: `https://gateway.thegraph.com/api/${process.env.THE_GRAPH_API_TOKEN}/subgraphs/id/GfHFdFmiSwW1PKtnDhhcxhArwtTjVuMnXxQ5XcETF1bP`,
schema: `https://gateway.thegraph.com/api/${process.env.THE_GRAPH_API_TOKEN}/subgraphs/id/9uvKq57ZiNCdT9uZ6xaFhp3yYczTM4Fgr7CJHM6tdX9H`,
documents: [
'src/handlers/remote-schemas/resolvers/daohaus/**/(!(*.d)).ts',
],
plugins: [
'typescript',
'typescript-operations',
'typescript-graphql-request',
'typescript-resolvers',
{ add: { content: '/* eslint-disable */' } },
],
config: {
avoidOptionals: true,
dedupeOperationSuffix: true,
typesPrefix: 'DaoHaus',
},
},
'src/lib/autogen/seedgraph-sdk.ts': {
schema: 'https://api.thegraph.com/subgraphs/name/tenfinney/polygon-seeds',
documents: [
'src/handlers/remote-schemas/resolvers/seedGraph/**/(!(*.d)).ts',
],
plugins: [
'typescript',
'typescript-operations',
'typescript-graphql-request',
{ add: { content: '/* eslint-disable */' } },
],
config: {
avoidOptionals: true,
dedupeOperationSuffix: true,
},
},
'src/lib/autogen/balancerpolygon-sdk.ts': {
schema:
'https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-polygon-v2',
documents: [
'src/handlers/remote-schemas/resolvers/balancerPolygon/**/(!(*.d)).ts',
],
plugins: [
'typescript',
'typescript-operations',
'typescript-graphql-request',
{ add: { content: '/* eslint-disable */' } },
],
config: {
avoidOptionals: true,
dedupeOperationSuffix: true,
},
},
},
};
export default config;