【发布时间】:2019-07-25 00:05:05
【问题描述】:
在这个post上作者做了一个这样的例子助手 并且使用的包是Lighthouse
public function graphql(string $query)
{
return $this->post('/graphql', [
'query' => $query
]);
}
所以可以这样使用:
$response = $this->graphql("{articles(first: 10) { edges { node { title } } } }");
但是我可以在突变上实现它吗?如果例如我有一个突变:
type Mutation {
sampleMutation(
id: ID!
)
}
我不确定如何在突变上执行此操作。
【问题讨论】:
标签: laravel graphql laravel-lighthouse