Skip to content

Commit

Permalink
[F] Type 'id' args as ids
Browse files Browse the repository at this point in the history
  • Loading branch information
kylepratuch committed Oct 11, 2023
1 parent 8b20e72 commit b36acd3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions api/modules/investigations/gql/interfaces/elements/Answer.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ public static function getFieldDefinitions(): array
[
'userId' => [
'name' => 'userId',
'type' => Type::int(),
'type' => Type::id(),
'description' => 'ID of the user answering the question'
],
'questionId' => [
'name' => 'questionId',
'type' => Type::int(),
'type' => Type::id(),
'description' => 'ID of the question being answered'
],
'investigationId' => [
'name' => 'investigationId',
'type' => Type::int(),
'type' => Type::id(),
'description' => 'ID of the Investigation parent'
],
'data' => [
Expand Down
12 changes: 6 additions & 6 deletions api/modules/investigations/gql/mutations/Answer.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ public static function getMutations(): array
$mutations['createAnswer'] = [
'name' => 'createAnswer',
'args' => [
'userId' => Type::nonNull(Type::int()),
'questionId' => Type::nonNull(Type::int()),
'investigationId' => Type::nonNull(Type::int()),
'userId' => Type::nonNull(Type::id()),
'questionId' => Type::nonNull(Type::id()),
'investigationId' => Type::nonNull(Type::id()),
'data' => Type::string()
],
'resolve' => [$resolver, 'saveAnswer'],
Expand All @@ -37,7 +37,7 @@ public static function getMutations(): array
$mutations['saveAnswer'] = [
'name' => 'saveAnswer',
'args' => [
'id' => Type::nonNull(Type::int()),
'id' => Type::nonNull(Type::id()),
'data' => Type::string()
],
'resolve' => [$resolver, 'saveAnswer'],
Expand All @@ -48,8 +48,8 @@ public static function getMutations(): array
$mutations['saveAnswersFromSet'] = [
'name' => 'saveAnswersFromSet',
'args' => [
'userId' => Type::nonNull(Type::int()),
'investigationId' => Type::nonNull(Type::int()),
'userId' => Type::nonNull(Type::id()),
'investigationId' => Type::nonNull(Type::id()),
'answerSet' => Type::listOf(AnswerInput::getType())
],
'resolve' => [$resolver, 'saveAnswersFromSet'],
Expand Down
4 changes: 2 additions & 2 deletions api/modules/investigations/gql/types/input/Answer.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ public static function getType(): mixed
'fields' => [
'id' => [
'name' => 'id',
'type' => Type::int(),
'type' => Type::id(),
'description' => 'The ID of the Answer element, if it exists.',
],
'questionId' => [
'name' => 'questionId',
'type' => Type::int(),
'type' => Type::id(),
'description' => 'The ID of the associated Question entry.',
],
'data' => [
Expand Down

0 comments on commit b36acd3

Please sign in to comment.