Skip to content

Implement a dynamic graphql schema #563

@wileymc

Description

@wileymc

Our schema uses #[guard] macros to enforce access for various users/roles/organizations which causes problems for the graphql playground.

{
  "error": "Invalid or incomplete schema, unknown type: EmbedOriginResult. Ensure that a full introspection query is used in order to build a client schema."
}

Introspection doesn't work in this context because of the field & resolver guards. The public facing API should not including these methods for introspection. I believe this can be achieved using async-graphql's dynamic schema feature though I am unsure of what the implementation should look like.

Our schema uses #[guard] macros to enforce access for various users/roles/organizations which causes problems for the graphql playground.

{
  "error": "Invalid or incomplete schema, unknown type: EmbedOriginResult. Ensure that a full introspection query is used in order to build a client schema."
}

Introspection doesn't work in this context because of the field & resolver guards. The public facing API should not including these methods for introspection. I believe this can be achieved using async-graphql's dynamic schema feature though I am unsure of what the implementation should look like.

Metadata

Metadata

Assignees

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