ChilliCream / graphql-platform

Welcome to the home of the Hot Chocolate GraphQL server for .NET, the Strawberry Shake GraphQL client for .NET and Banana Cake Pop the awesome Monaco based GraphQL IDE.
https://chillicream.com
MIT License
5.16k stars 736 forks source link

Got error for query schema "Introspection is not allowed for the current request" #7473

Closed JerryWang20 closed 2 days ago

JerryWang20 commented 2 days ago

Product

Hot Chocolate

Version

14.0.0 rc1

Link to minimal reproduction

https://github.com/ChilliCream/graphql-platform

Steps to reproduce

The function works well in locala VS, after deploy to Azure. open the schema with error "Introspection is not allowed for the current request". But i already setting following in the code. Pls help on how to fix this builder.Services.AddGraphQLServer() .AllowIntrospection(true)

What is expected?

Should open the graphql schema

What is actually happening?

The function works well in locala VS, after deploy to Azure. open the schema with error "Introspection is not allowed for the current request". But i already setting following in the code. Pls help on how to fix this builder.Services.AddGraphQLServer() .AllowIntrospection(true)

Relevant log output

No response

Additional context

No response

michaelstaib commented 2 days ago

This is the expected behavior ... we by default secure the GraphQL server .... however ... the new bcp should pick up the schema file with rc2 and use this instead of introspection ...

JerryWang20 commented 2 days ago

if we want to expose the schema, how to enable it?

JerryWang20 commented 2 days ago

i install bcp and try to open the schema with same error return

JerryWang20 commented 2 days ago

@michaelstaib any document describe the steps?

glen-84 commented 1 day ago

@JerryWang20

builder.Services
    .AddGraphQLServer()
    .RemoveIntrospectionAllowedRule();