dosco/graphjin

I have doubts about how to insert it password

duolabmeng6 opened this issue · 1 comments

package main

import (
	"log"
	"net/http"
	"path/filepath"

	"github.com/dosco/graphjin/serv/v3"
	"github.com/go-chi/chi/v5"
)

func main() {
	// create the router
	r := chi.NewRouter()

	// readin graphjin config
	conf, err := serv.ReadInConfig(filepath.Join("./config", "dev.yml"))
	if err != nil {
		panic(err)
	}

	// create the graphjin service
	gjs, err := serv.NewGraphJinService(conf)
	if err != nil {
		log.Fatal(err)
	}

	// attach the graphql http handler
	r.Handle("/graphql", gjs.GraphQL(nil))

	// attach the rest http handler
	r.Handle("/rest/*", gjs.REST(nil))

	// attach the webui http handler
	r.Handle("/webui/*", gjs.WebUI("/webui/", "/graphql"))

	// add your own http handlers
	r.Get("/", func(w http.ResponseWriter, r *http.Request) {
		w.Write([]byte("Welcome to the webshop!"))
	})

	http.ListenAndServe(":8080", r)
}

I created it using the code above webui

image
mutation createUser {
  users(insert: { username: $username, password: $password }) {
    id
    username
    password
  }
}
{
  "errors": [
    {
      "message": "column: 'public.users.password' blocked"
    }
  ]
}

I did not find the configuration of the blocked in the document.
I want to insert password how to do it

Field and table names that you wish to block

blocklist:

  • ar_internal_metadata
  • schema_migrations
  • secret
  • password
  • encrypted
  • token