-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add list of already bridged nfts to create form
- Loading branch information
1 parent
dccb3e8
commit 3dafadf
Showing
15 changed files
with
705 additions
and
1,486 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { CodegenConfig } from "@graphql-codegen/cli" | ||
import * as dotenv from "dotenv" | ||
|
||
dotenv.config() | ||
|
||
if (!process.env.NEXT_PUBLIC_API_EVENT_CACHE) | ||
throw new Error("NEXT_PUBLIC_API_EVENT_CACHE is not set") | ||
|
||
const config: CodegenConfig = { | ||
schema: process.env.NEXT_PUBLIC_API_EVENT_CACHE, | ||
documents: ["lib/event-cache/hooks/*.tsx"], | ||
ignoreNoDocuments: true, // for better experience with the watcher | ||
generates: { | ||
"./lib/event-cache/gql/": { | ||
preset: "client", | ||
}, | ||
}, | ||
} | ||
|
||
export default config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* eslint-disable */ | ||
import { TypedDocumentNode as DocumentNode } from "@graphql-typed-document-node/core" | ||
|
||
import * as types from "./graphql" | ||
|
||
/** | ||
* Map of all GraphQL operations in the project. | ||
* | ||
* This map has several performance disadvantages: | ||
* 1. It is not tree-shakeable, so it will include all operations in the project. | ||
* 2. It is not minifiable, so the string of a GraphQL query will be multiple times inside the bundle. | ||
* 3. It does not support dead code elimination, so it will add unused operations. | ||
* | ||
* Therefore it is highly recommended to use the babel or swc plugin for production. | ||
*/ | ||
const documents = { | ||
"\n query allOptimismMintableERC721Query($limit: Int) {\n optimismMintableERC721s(limit: $limit) {\n items {\n id\n chainId\n blockNumber\n localToken\n localName\n localSymbol\n remoteToken\n remoteName\n remoteSymbol\n deployer\n }\n }\n }\n": | ||
types.AllOptimismMintableErc721QueryDocument, | ||
"\n query getOtimismMintableERC721ByRemoteTokenQuery(\n $remoteToken: String!\n $chainId: Int!\n ) {\n optimismMintableERC721s(\n where: { remoteToken: $remoteToken, chainId: $chainId }\n ) {\n items {\n id\n chainId\n blockNumber\n localToken\n localName\n localSymbol\n remoteToken\n remoteName\n remoteSymbol\n deployer\n }\n }\n }\n": | ||
types.GetOtimismMintableErc721ByRemoteTokenQueryDocument, | ||
} | ||
|
||
/** | ||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. | ||
* | ||
* | ||
* @example | ||
* ```ts | ||
* const query = graphql(`query GetUser($id: ID!) { user(id: $id) { name } }`); | ||
* ``` | ||
* | ||
* The query argument is unknown! | ||
* Please regenerate the types. | ||
*/ | ||
export function graphql(source: string): unknown | ||
|
||
/** | ||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. | ||
*/ | ||
export function graphql( | ||
source: "\n query allOptimismMintableERC721Query($limit: Int) {\n optimismMintableERC721s(limit: $limit) {\n items {\n id\n chainId\n blockNumber\n localToken\n localName\n localSymbol\n remoteToken\n remoteName\n remoteSymbol\n deployer\n }\n }\n }\n" | ||
): (typeof documents)["\n query allOptimismMintableERC721Query($limit: Int) {\n optimismMintableERC721s(limit: $limit) {\n items {\n id\n chainId\n blockNumber\n localToken\n localName\n localSymbol\n remoteToken\n remoteName\n remoteSymbol\n deployer\n }\n }\n }\n"] | ||
/** | ||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. | ||
*/ | ||
export function graphql( | ||
source: "\n query getOtimismMintableERC721ByRemoteTokenQuery(\n $remoteToken: String!\n $chainId: Int!\n ) {\n optimismMintableERC721s(\n where: { remoteToken: $remoteToken, chainId: $chainId }\n ) {\n items {\n id\n chainId\n blockNumber\n localToken\n localName\n localSymbol\n remoteToken\n remoteName\n remoteSymbol\n deployer\n }\n }\n }\n" | ||
): (typeof documents)["\n query getOtimismMintableERC721ByRemoteTokenQuery(\n $remoteToken: String!\n $chainId: Int!\n ) {\n optimismMintableERC721s(\n where: { remoteToken: $remoteToken, chainId: $chainId }\n ) {\n items {\n id\n chainId\n blockNumber\n localToken\n localName\n localSymbol\n remoteToken\n remoteName\n remoteSymbol\n deployer\n }\n }\n }\n"] | ||
|
||
export function graphql(source: string) { | ||
return (documents as any)[source] ?? {} | ||
} | ||
|
||
export type DocumentType<TDocumentNode extends DocumentNode<any, any>> = | ||
TDocumentNode extends DocumentNode<infer TType, any> ? TType : never |
Oops, something went wrong.