[READ-ONLY] Mirror of https://github.com/andrioid/gostack. Experimental backend stack (work-in-progress)
0

Configure Feed

Select the types of activity you want to include in your feed.

gostack / module / module.go
775 B 21 lines
1// Package module is an interface to domain packages, and accompanied utils. Sorry for the generic name. 2// - GraphQL: Module can add types and additions to the query and mutation type 3// - HTTP: Module can add routes and middleware 4// Inspired by: https://gist.github.com/abdullin/3e3fd199674255e4d206 5 6package module 7 8import ( 9 "github.com/graphql-go/graphql" 10) 11 12type Module interface { 13 MutationTypes() (mutations graphql.Fields, err error) // GraphQL mutation to expose 14 QueryTypes() (queries graphql.Fields, err error) // GraphQL Queries to expose 15 // Routes() string // Which HTTP routes to expose, maybe layer 16} 17 18// Takes a collection of modules and returns a GraphQL schema 19func CreateSchema(m []Module) (graphql.Schema, error) { 20 return graphql.Schema{}, nil 21}