Skip to content
This repository has been archived by the owner on Feb 15, 2023. It is now read-only.

pub a api by struct must have bool field #363

Open
ansjsun opened this issue Apr 15, 2020 · 0 comments
Open

pub a api by struct must have bool field #363

ansjsun opened this issue Apr 15, 2020 · 0 comments

Comments

@ansjsun
Copy link

ansjsun commented Apr 15, 2020

struct AAA{
Name string
}

introspection.AddIntrospectionToSchema(schema)
router.NewRoute().Name(model).Methods(http.MethodGet, http.MethodPost).Path(model).Handler(graphql.HTTPHandler(schema))

by HTTPHandler method start is ok

but when i use iql , it report

Error: Invalid or incomplete schema, unknown type: bool. Ensure that a full introspection query is used in order to build a client schema.
    at r (file:///Applications/GraphiQL.app/Contents/Resources/app.asar/dist/bundle.js:32:21670)
    at n (file:///Applications/GraphiQL.app/Contents/Resources/app.asar/dist/bundle.js:32:21603)
    at i (file:///Applications/GraphiQL.app/Contents/Resources/app.asar/dist/bundle.js:32:21863)
    at x (file:///Applications/GraphiQL.app/Contents/Resources/app.asar/dist/bundle.js:32:24361)
    at file:///Applications/GraphiQL.app/Contents/Resources/app.asar/dist/bundle.js:28:15421
    at Array.reduce (native)
    at n (file:///Applications/GraphiQL.app/Contents/Resources/app.asar/dist/bundle.js:28:15385)
    at N (file:///Applications/GraphiQL.app/Contents/Resources/app.asar/dist/bundle.js:32:24308)
    at L (file:///Applications/GraphiQL.app/Contents/Resources/app.asar/dist/bundle.js:32:25039)
    at Array.map (native)

but i take struct to

struct AAA{
Name string
Hello bool
}

it works well!!!!!!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant