fictional-fiesta

command module
v0.0.0-...-c983b52 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2025 License: GPL-3.0 Imports: 13 Imported by: 0

README

fictional-fiesta

Summary

A proof of concept HTML Form Builder created using Golang, GraphQL, and MongoDB

Build With

Getting Started

Setup MongoDB Database
  1. make sure you have docker installed
  2. run echo "MONGO_DB_URL=mongodb://root:example@0.0.0.0:27017/\n DATABASE_NAME=forms" > .env
  3. run docker compose up -d to start mongodb server locally
Running the Project
  1. run go get to install modules
  2. run go run main.go to start the project
  3. run curl http://localhost:8080/
  4. You should received
{ "status": "ok" }

Examples

All examples use the localhost environment for testing. They demonstrate variables, queries, and mutations.

Basic Fetching
Query
query filterForms($id: String!, $page: Int, $limit: Int) {
  list(id: $id, page: $page, limit: $limit) {
    count,
    results {
      id,
      fieldsets {
        fields {
          ordinal,
          name,
          type,
        }
        legend,
      }
    }
  }
}
Variables
{
  "id": "68b99132f30dfb2ed5aed633"
}
Creating a New Form
mutation
mutation createForm($name: String!, $active: Boolean!, $fieldsets: FieldSetInput) {
  create(name: $name, active: $active, fieldset: $fieldsets) {
      id
  }
}
Variables
{
  "active": true,
  "fieldsets": {
    "inputs": [
      {
        "label": "First Name",
        "multiple": false,
        "required": true,
        "type": "text"
      },
      {
        "label": "Last Name",
        "multiple": false,
        "required": true,
        "type": "text"
      }
    ],
    "label": "Basic Contact"
  },
  "name": "A name that you want this form to be"
}

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
db module
mongodb module
graph module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL