Documentation ¶
Index ¶
Constants ¶
View Source
const ( QueryCacheSize = 1000 PersistedQuerySize = 100 KeepAlivePingInterval = 5 )
View Source
const ( // Path where the application is served. AppPath = "/" // Internal path where the application files are stored. AppTargetPath = "./static" // Path where the API is served. APIPath = "/graphql" PlaygroundPath = "/playground" // Title shown in the browser tab for the playground. PlaygroundTitle = "ZeeVision Playground" ServerReadTimeoutSecs = 5 ServerWriteTimeoutSecs = 10 )
Variables ¶
This section is empty.
Functions ¶
func NewAPIServer ¶
Create a new API server.
Types ¶
type Config ¶
type Config struct { // The port used to host the application. AppPort uint16 // The port used to host the API. APIPort uint16 // This defines if the endpoint should serve also the application // files or not. DoHostApp bool // This defines if the endpoint should serve also the GraphQL // playground or not. DoHostPlayground bool // This defines if the endpoint is running in production mode or // not. Production bool // This defines the allowed origins for CORS. AllowedOrigins []string }
Configuration used to create a new endpoint.
Click to show internal directories.
Click to hide internal directories.