首页 > 解决方案 > Laravel GraphiQL“文档资源管理器”说“没有可用的模式”

问题描述

我正在使用这个 Laravel graphQL 实现:https ://github.com/rebing/graphql-laravel ,它使用这个 graphiQL 实现:https ://github.com/graphql/graphiql

我正在尝试通过https://my_IP/graphiql路由使用 graphiQL 探索我的 graphQL 架构,但它只是说NO SCHEMA AVAILABLE如下:

在此处输入图像描述

但是,它应该显示如下文档:https ://graphql.org/swapi-graphql

我的模式声明config/graphql.php如下:

'schemas' => [
        'default' => [
            'query' => [
                'users' => \myPath\UsersQuery::class,
                'subscribers' => \myPath\SubscribersQuery::class,
                ...
            ],
            'mutation' => [
                ...
            ],
            'middleware' => [],
            'method' => ['get', 'post'],
        ],
    ],

我是否错过了一些配置以允许文档探索?

标签: phplaravelgraphqldocumentationgraphiql

解决方案


推荐阅读