Skip to content

Commit

Permalink
Merge pull request #1359 from bakaphp/hotfix-shopify-sync-price-stock
Browse files Browse the repository at this point in the history
refact: topics and reactions
  • Loading branch information
kaioken authored May 21, 2024
2 parents 1b918c3 + 9fdb396 commit 58b0da5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions graphql/schemas/Social/reactions.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ extend type Mutation @guard {
}

extend type Query {
getReactions(
reactions(
where: _
@whereConditions(
columns: ["id", "name", "apps_id", "companies_id", "icon"]
Expand All @@ -62,9 +62,9 @@ extend type Query {
defaultCount: 25
scopes: ["fromApp"]
)
getReaction(id: ID! @eq): Reaction
reaction(id: ID! @eq): Reaction
@find(model: "Kanvas\\Social\\Reactions\\Models\\Reaction")
getUserReactions(
userReactions(
where: _
@whereConditions(
columns: [
Expand Down
2 changes: 1 addition & 1 deletion graphql/schemas/Social/topics.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ input TopicInput {
}

extend type Query {
getTopics(
topics(
where: _
@whereConditions(
columns: [
Expand Down
10 changes: 5 additions & 5 deletions tests/GraphQL/Social/ReactionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ public function testGetReactions()
$response = $this->graphQL(/** @lang GRAPHQL */
'
query getReactions {
getReactions(
query reactions {
reactions(
orderBy: {column: ID, order: DESC}
) {
data {
Expand All @@ -185,9 +185,9 @@ public function testGetReactions()
}
}'
);
$this->assertArrayHasKey('getReactions', $response->json('data'));
$this->assertArrayHasKey('data', $response->json('data.getReactions'));
$this->assertArrayHasKey('id', $response->json('data.getReactions.data.0'));
$this->assertArrayHasKey('reactions', $response->json('data'));
$this->assertArrayHasKey('data', $response->json('data.reactions'));
$this->assertArrayHasKey('id', $response->json('data.reactions.data.0'));
}

public function testReactToEntity()
Expand Down
2 changes: 1 addition & 1 deletion tests/GraphQL/Social/TopicsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public function testGetTopic()
$this->graphQL(
'
{
getTopics {
topics {
data {
id
name
Expand Down

0 comments on commit 58b0da5

Please sign in to comment.