Bnanan-Labs / cube-registration-admin-service

0 stars 0 forks source link

Error when editing registration #47

Closed Zoe7 closed 2 years ago

Zoe7 commented 2 years ago

mutation:

mutation UpdateRegistration($input: UpdateRegistrationInput) {
  updateRegistration(input: $input) {
    id
    __typename
  }
}

input:

{
    "competition_id": "855c0817-224e-30de-8904-36765f068a9b",
    "email": "zoe.demoffarts@gmail.com",
    "first_name": "Zoé",
    "last_name": "de Moffarts",
    "is_interested_in_nations_cup": true,
    "guests": [
        "anonymous_guest"
    ],
    "event_ids": [
        "23ba94c4-925d-44c8-9726-caa9dd642a66",
        "b5fac066-c1ae-4a3d-8d3e-26adad25abae",
        "9c471d51-21b2-4dbe-ba21-7f76b7f30728"
    ]
}

error:

[
  {
    "debugMessage": "Too few arguments to function App\\Policies\\CompetitorPolicy::manage(), 1 passed in /home/forge/dev-api.wca2022.eu/vendor/laravel/framework/src/Illuminate/Auth/Access/Gate.php on line 799 and exactly 2 expected",
    "message": "Internal server error",
    "extensions": {
      "category": "internal"
    },
    "locations": [
      {
        "line": 2,
        "column": 3
      }
    ],
    "path": [
      "updateRegistration"
    ],
    "trace": [
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/laravel/framework/src/Illuminate/Auth/Access/Gate.php",
        "line": 799,
        "call": "App\\Policies\\CompetitorPolicy::manage()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/laravel/framework/src/Illuminate/Auth/Access/Gate.php",
        "line": 752,
        "call": "Illuminate\\Auth\\Access\\Gate::callPolicyMethod()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/laravel/framework/src/Illuminate/Auth/Access/Gate.php",
        "line": 536,
        "call": "Illuminate\\Auth\\Access\\Gate::Illuminate\\Auth\\Access\\{closure}()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/laravel/framework/src/Illuminate/Auth/Access/Gate.php",
        "line": 431,
        "call": "Illuminate\\Auth\\Access\\Gate::callAuthCallback()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/laravel/framework/src/Illuminate/Auth/Access/Gate.php",
        "line": 396,
        "call": "Illuminate\\Auth\\Access\\Gate::raw()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/nuwave/lighthouse/src/Auth/CanDirective.php",
        "line": 219,
        "call": "Illuminate\\Auth\\Access\\Gate::inspect()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/nuwave/lighthouse/src/Support/Utils.php",
        "line": 99,
        "call": "Nuwave\\Lighthouse\\Auth\\CanDirective::Nuwave\\Lighthouse\\Auth\\{closure}()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/nuwave/lighthouse/src/Auth/CanDirective.php",
        "line": 225,
        "call": "Nuwave\\Lighthouse\\Support\\Utils::applyEach()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/nuwave/lighthouse/src/Auth/CanDirective.php",
        "line": 120,
        "call": "Nuwave\\Lighthouse\\Auth\\CanDirective::authorize()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/nuwave/lighthouse/src/Auth/GuardDirective.php",
        "line": 69,
        "call": "Nuwave\\Lighthouse\\Auth\\CanDirective::Nuwave\\Lighthouse\\Auth\\{closure}()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/nuwave/lighthouse/src/Schema/Directives/RenameArgsDirective.php",
        "line": 35,
        "call": "Nuwave\\Lighthouse\\Auth\\GuardDirective::Nuwave\\Lighthouse\\Auth\\{closure}()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/nuwave/lighthouse/src/Schema/Directives/SpreadDirective.php",
        "line": 34,
        "call": "Nuwave\\Lighthouse\\Schema\\Directives\\RenameArgsDirective::Nuwave\\Lighthouse\\Schema\\Directives\\{closure}()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/nuwave/lighthouse/src/Schema/Directives/ArgTraversalDirective.php",
        "line": 27,
        "call": "Nuwave\\Lighthouse\\Schema\\Directives\\SpreadDirective::Nuwave\\Lighthouse\\Schema\\Directives\\{closure}()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/nuwave/lighthouse/src/Validation/ValidateDirective.php",
        "line": 49,
        "call": "Nuwave\\Lighthouse\\Schema\\Directives\\ArgTraversalDirective::Nuwave\\Lighthouse\\Schema\\Directives\\{closure}()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/nuwave/lighthouse/src/Schema/Directives/ArgTraversalDirective.php",
        "line": 27,
        "call": "Nuwave\\Lighthouse\\Validation\\ValidateDirective::Nuwave\\Lighthouse\\Validation\\{closure}()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/nuwave/lighthouse/src/Schema/Directives/TrimDirective.php",
        "line": 54,
        "call": "Nuwave\\Lighthouse\\Schema\\Directives\\ArgTraversalDirective::Nuwave\\Lighthouse\\Schema\\Directives\\{closure}()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/nuwave/lighthouse/src/Schema/Factories/FieldFactory.php",
        "line": 98,
        "call": "Nuwave\\Lighthouse\\Schema\\Directives\\TrimDirective::Nuwave\\Lighthouse\\Schema\\Directives\\{closure}()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
        "line": 623,
        "call": "Nuwave\\Lighthouse\\Schema\\Factories\\FieldFactory::Nuwave\\Lighthouse\\Schema\\Factories\\{closure}()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
        "line": 550,
        "call": "GraphQL\\Executor\\ReferenceExecutor::resolveFieldValueOrError()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
        "line": 474,
        "call": "GraphQL\\Executor\\ReferenceExecutor::resolveField()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
        "line": 857,
        "call": "GraphQL\\Executor\\ReferenceExecutor::GraphQL\\Executor\\{closure}()"
      },
      {
        "call": "GraphQL\\Executor\\ReferenceExecutor::GraphQL\\Executor\\{closure}()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
        "line": 859,
        "function": "array_reduce()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
        "line": 490,
        "call": "GraphQL\\Executor\\ReferenceExecutor::promiseReduce()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
        "line": 263,
        "call": "GraphQL\\Executor\\ReferenceExecutor::executeFieldsSerially()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/webonyx/graphql-php/src/Executor/ReferenceExecutor.php",
        "line": 215,
        "call": "GraphQL\\Executor\\ReferenceExecutor::executeOperation()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/webonyx/graphql-php/src/Executor/Executor.php",
        "line": 156,
        "call": "GraphQL\\Executor\\ReferenceExecutor::doExecute()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/webonyx/graphql-php/src/GraphQL.php",
        "line": 162,
        "call": "GraphQL\\Executor\\Executor::promiseToExecute()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/webonyx/graphql-php/src/GraphQL.php",
        "line": 94,
        "call": "GraphQL\\GraphQL::promiseToExecute()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/nuwave/lighthouse/src/GraphQL.php",
        "line": 268,
        "call": "GraphQL\\GraphQL::executeQuery()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/nuwave/lighthouse/src/GraphQL.php",
        "line": 203,
        "call": "Nuwave\\Lighthouse\\GraphQL::executeParsedQuery()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/nuwave/lighthouse/src/GraphQL.php",
        "line": 162,
        "call": "Nuwave\\Lighthouse\\GraphQL::parseAndExecuteQuery()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/nuwave/lighthouse/src/GraphQL.php",
        "line": 121,
        "call": "Nuwave\\Lighthouse\\GraphQL::executeOperation()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/nuwave/lighthouse/src/Support/Utils.php",
        "line": 99,
        "call": "Nuwave\\Lighthouse\\GraphQL::Nuwave\\Lighthouse\\{closure}()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/nuwave/lighthouse/src/GraphQL.php",
        "line": 120,
        "call": "Nuwave\\Lighthouse\\Support\\Utils::applyEach()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/nuwave/lighthouse/src/Support/Http/Controllers/GraphQLController.php",
        "line": 32,
        "call": "Nuwave\\Lighthouse\\GraphQL::executeOperationOrOperations()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php",
        "line": 48,
        "call": "Nuwave\\Lighthouse\\Support\\Http\\Controllers\\GraphQLController::__invoke()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/laravel/framework/src/Illuminate/Routing/Route.php",
        "line": 261,
        "call": "Illuminate\\Routing\\ControllerDispatcher::dispatch()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/laravel/framework/src/Illuminate/Routing/Route.php",
        "line": 204,
        "call": "Illuminate\\Routing\\Route::runController()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
        "line": 725,
        "call": "Illuminate\\Routing\\Route::run()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
        "line": 128,
        "call": "Illuminate\\Routing\\Router::Illuminate\\Routing\\{closure}()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/nuwave/lighthouse/src/Support/Http/Middleware/AttemptAuthentication.php",
        "line": 34,
        "call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
        "line": 167,
        "call": "Nuwave\\Lighthouse\\Support\\Http\\Middleware\\AttemptAuthentication::handle()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/nuwave/lighthouse/src/Support/Http/Middleware/AcceptJson.php",
        "line": 27,
        "call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
        "line": 167,
        "call": "Nuwave\\Lighthouse\\Support\\Http\\Middleware\\AcceptJson::handle()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
        "line": 103,
        "call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
        "line": 727,
        "call": "Illuminate\\Pipeline\\Pipeline::then()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
        "line": 702,
        "call": "Illuminate\\Routing\\Router::runRouteWithinStack()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
        "line": 666,
        "call": "Illuminate\\Routing\\Router::runRoute()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
        "line": 655,
        "call": "Illuminate\\Routing\\Router::dispatchToRoute()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
        "line": 167,
        "call": "Illuminate\\Routing\\Router::dispatch()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
        "line": 128,
        "call": "Illuminate\\Foundation\\Http\\Kernel::Illuminate\\Foundation\\Http\\{closure}()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
        "line": 21,
        "call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php",
        "line": 31,
        "call": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest::handle()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
        "line": 167,
        "call": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull::handle()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
        "line": 21,
        "call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php",
        "line": 40,
        "call": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest::handle()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
        "line": 167,
        "call": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings::handle()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php",
        "line": 27,
        "call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
        "line": 167,
        "call": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize::handle()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php",
        "line": 86,
        "call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
        "line": 167,
        "call": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance::handle()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/fruitcake/laravel-cors/src/HandleCors.php",
        "line": 52,
        "call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
        "line": 167,
        "call": "Fruitcake\\Cors\\HandleCors::handle()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php",
        "line": 39,
        "call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
        "line": 167,
        "call": "Illuminate\\Http\\Middleware\\TrustProxies::handle()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
        "line": 103,
        "call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
        "line": 142,
        "call": "Illuminate\\Pipeline\\Pipeline::then()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
        "line": 111,
        "call": "Illuminate\\Foundation\\Http\\Kernel::sendRequestThroughRouter()"
      },
      {
        "file": "/home/forge/dev-api.wca2022.eu/public/index.php",
        "line": 52,
        "call": "Illuminate\\Foundation\\Http\\Kernel::handle()"
      }
    ]
  }
]
Odder commented 2 years ago

Please note that you have to use id instead of competition_id now :)