echonext-integrations
/echonext-integrations
Add WebSocket, GraphQL, or file-upload endpoints to an EchoNext app. Use when building real-time/WebSocket handlers (Hub pattern), wiring a gqlgen GraphQL schema, or accepting multipart file uploads with validation.
- Author
- abdussamadbello ↗
- Repository
- echonext ↗
- Licence
- MIT
- Last repository change
- 26.10.2026
Assessment and security
- Files in this package
- 4
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Add WebSocket, GraphQL, or file-upload endpoints to an EchoNext app. Use when building real-time/WebSocket handlers (Hub pattern), wiring a gqlgen GraphQL schema, or accepting multipart file uploads with validation.
Original author description
Add WebSocket, GraphQL, or file-upload endpoints to an EchoNext app. Use when building real-time/WebSocket handlers (Hub pattern), wiring a gqlgen GraphQL schema, or accepting multipart file uploads with validation.
How it works
- WebSocket — app.WS(...)
- GraphQL — app.GraphQL(...)
- File upload — app.Upload(...)
- Choosing
SKILL.md preview
---
name: echonext-integrations
description: >-
Add WebSocket, GraphQL, or file-upload endpoints to an EchoNext app. Use when
building real-time/WebSocket handlers (Hub pattern), wiring a gqlgen GraphQL
schema, or accepting multipart file uploads with validation.
license: MIT
metadata:
version: 0.1.0
---
# EchoNext Integrations
Beyond standard JSON handlers, EchoNext ships first-class support for three
integration types, each with its own package and route method. Scaffold any of
them with `echonext generate websocket|graphql|upload` (see `echonext-cli`),
then fill in the logic using the references below.
## WebSocket — `app.WS(...)`
Implement the `websocket.Handler` interface (connect/message/disconnect
lifecycle) and register it. A `Hub` tracks connections and broadcasts.
```go
app.WS("/ws/chat", chatHandler, echonext.Route{
Summary: "Chat WebSocket",
Tags: []string{"Chat"},
})
```
The interface (note `OnMessage` takes a `messageType int`):
```go
type Handler interface {
OnConnect(conn *websocket.Connection) error
OnMessage(conn *websocket.Connection, messageType int, data []byte) error
OnDisconnect(conn *websocket.Connection, err error)
}
```
Full Hub/Connection API and a chat example:
[`references/websocket.md`](references/websocket.md).
## GraphQL — `app.GraphQL(...)`
Pass a gqlgen `ExecutableSchema` via `graphql.Config`; the Echo context is
injected so resolvers can read auth/request data.
```go
app.GraphQL(graphql.Config{
Path: "/graphql",
PlaygroundPath: "/playground",
Schema: generated.NewExecutableSchema(generated.Config{Resolvers: r}),
EnableIntrospection: true,
}, graphql.Route{Summary: "GraphQL API", Tags: []string{"GraphQL"}})
```
Config/Route fields and resolver context access:
[`references/graphql.md`](references/graphql.md).
## File upload — `app.Upload(...)`
Use a request struct with `*upload.File` (or `[]*upload.File`) fields tagged
`form:"..."`; the framework parses multipart, enforces `upload.Config` limits,
and validates.
```go
type AvatarRequest struct {
File *upload.File `form:"file" validate:"required"`
}
app.Upload("/avatar", uploadAvatar, echonext.Route{
Summary: "Upload avatar",
Tags: []string{"Avatar"},
FileConfig: &upload.Config{MaxFileSize: 5 << 20, AllowedExtensions: []string{".png", ".jpg"}},
})
```
`File` methods (`SaveTo`, `Open`, `Read`, `Extension`) and multi-file uploads:
[`references/upload.md`](references/upload.md).
## Choosing
- **WebSocket** — real-time, bidirectional (chat, live updates).
- **GraphQL** — flexible client-driven queries over a typed schema.
- **Upload** — multipart file intake with size/type validation.
All three still register routes on the same `*App` and appear in the generated
OpenAPI spec (upload as multipart; GraphQL/WS documented per their `Route`).
Files in this package (4)
- SKILL.md 3 KB
- references/graphql.md 2 KB
- references/upload.md 3 KB
- references/websocket.md 3 KB
Versions
The database has no other skills named echonext-integrations.
Database snapshot: 13.11.2026 · package version 63742b5ef86c (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100echonext-handlers
Write and register type-safe EchoNext HTTP handlers, request structs, and routes. Use when adding, editing, or debugging an echonext handler function, a request/response struct, validation tags, or a route registration (GET/POST/PUT/PATCH/DELETE). - 100echonext-testing
Write tests for EchoNext APIs using the pkg/contrib/testing helpers — APIClient for in-process HTTP requests, Suite for setup/teardown, and FixtureManager for seeding test data. Use when writing or fixing tests for echonext handlers, services, or endpoints. - 100golang-graphql
Implements GraphQL APIs in Golang using gqlgen or graphql-go. Apply when building GraphQL servers, designing schemas, writing resolvers, handling subscriptions, or integrating GraphQL with existing Go HTTP services. Also apply when the codebase imports… - 100go-graphql
Use when building or reviewing a GraphQL API in Go. Covers library choice (gqlgen vs graph-gophers), schema design (nullability, pagination, mutation envelopes), thin resolver pattern, per-request DataLoaders for N+1, authentication via context plus schema directives, error… - 100go-graphql
Use when building or reviewing a GraphQL API in Go. Covers library choice (gqlgen vs graph-gophers), schema design (nullability, pagination, mutation envelopes), thin resolver pattern, per-request DataLoaders for N+1, authentication via context plus schema directives, error… - 100go-graphql
Build GraphQL servers in Go with gqlgen: schema-first generation, resolver structure, the N+1 problem and dataloaders, complexity and depth limits, error presentation, field-level authorization, and testing resolvers. Use when implementing or reviewing a GraphQL API, when a…