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

pub a api by struct must have bool field #363

@ansjsun

Description

@ansjsun
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!!!!!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions