Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Queryをプラグイン/カスタマイズで追加できるようにする #47

Merged
merged 1 commit into from
Jul 27, 2020

Conversation

kiy0taka
Copy link
Contributor

Plugin\Api\GraphQL\Query インターフェイスを実装したクラスをコンテナに登録していれば、GraphQLに追加されるようにした。

Copy link
Contributor

@okazy okazy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Query を実装して問題なく追加できることを確認しました。

<?php

namespace Plugin\Api\GraphQL\Query;

use GraphQL\Type\Definition\Type;
use Plugin\Api\GraphQL\Query;

class TestQuery implements Query
{
    public function getName()
    {
        return 'test';
    }

    public function getQuery()
    {
        return [
            'type' => Type::string(),
            'resolve' => function () {
                return 'test ok';
            },
        ];
    }
}

image

@okazy okazy added the enhancement New feature or request label Jul 27, 2020
@okazy okazy added this to the 1.0 milestone Jul 27, 2020
@okazy okazy merged commit 541924c into EC-CUBE:master Jul 27, 2020
@okazy
Copy link
Contributor

okazy commented Jul 27, 2020

ありがとうございます。取り込みました。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants