The first step to adding functionality to your new wrapper is to update the mutation schema by defining the methods you'd like users to query in GraphQL.
Here's an example of method and custom data types of our Tezos Domains wrapper that are added in your ./src/mutation/schema.graphql schema file:
In your src/mutation/index.ts file, import the new types that you defined:
import { Input_commit, Tezos_Mutation, Input_buy, TezosDomainsPlugin_Query,} from"./w3"# Importing codes that can be used in both queries and mutations import { getConnection, getSendParams } from"../common/utils";# Importing a query functionintomutationimport { encodeCommitment } from"../query";
Although these new types will not yet exist, they'll be generated in the ./src/mutation/w3/* folder after building via yarn.
Implement Mutation Method
Now you can implement the mutation method by adding the function to the bottom of your ./src/mutation/index.ts file. Example: