Skip to content

SFG20/training-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Example: Registering a GraphQL API

Filename: testapi.server.js

import { registerAPI } from "library/api/index.js";

registerAPI(
  /* GraphQL */
  `
    type Query {
      yourFunction: String
    }
  `,
  {
    Query: {
      yourFunction,
    },
  }
);

function yourFunction() {
  return "Hello World";
}

About

API training repository

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published