0.1.4-pre-alpha.3 • Published 1 year ago

@crosscopy/graphql-schema v0.1.4-pre-alpha.3

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

crosscopy-graphql-schema

GraphQL Schema Definitions for CrossCopy.

All code are generated into TypeScript from graphql files using codegen.

Usage

import { requests, resolver, typeDefs } from "@crosscopy/graphql-schema@latest";

// The resolver is not resolver implementation, but types for resolver.

const {getSdk} = requests;
const gqlClient = new GraphQLClient(this.setting.graphqlUrl);
const sdk = getSdk(gqlClient);
sdk
    .login({email, password})
    .then(async (res) => {...})

const schema = makeExecutableSchema({
  typeDefs,
  resolversImplementation // this needs to be implemented
})