Recent Topics

GraphQl Registration issue



  • Please help me.
    i post following query :
    mutation customerRegister ($fname:String!,$lnaem:String!,$email:String!,$password:String!,$confpassword:String!){
    customerRegister(input: {
    firstName: $fname,
    lastName: $lnaem,
    email: $email,
    password:$password,
    passwordConfirmation: $confpassword
    }) {
    status,
    success
    }
    }

    to URL ::http://35.239.195.234/hemchhaya/public/graphql

    But I am getting following error :
    {
    "errors": [
    {
    "debugMessage": "An unknown error occurred.",
    "message": "Internal server error",
    "extensions": {
    "category": "internal"
    },
    "locations": [
    {
    "line": 2,
    "column": 7
    }
    ],
    "path": [
    "customerRegister"
    ],
    "trace": [
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\nuwave\lighthouse\src\Schema\Directives\FieldDirective.php",
    "line": 51,
    "call": "Webkul\GraphQLAPI\Mutations\Shop\Customer\RegistrationMutation::register(null, array(2), instance of Nuwave\Lighthouse\Schema\Context, instance of GraphQL\Type\Definition\ResolveInfo)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\nuwave\lighthouse\src\Schema\Directives\RenameArgsDirective.php",
    "line": 33,
    "call": "Nuwave\Lighthouse\Schema\Directives\FieldDirective::Nuwave\Lighthouse\Schema\Directives\{closure}(null, array(1), instance of Nuwave\Lighthouse\Schema\Context, instance of GraphQL\Type\Definition\ResolveInfo)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\nuwave\lighthouse\src\Schema\Directives\SpreadDirective.php",
    "line": 34,
    "call": "Nuwave\Lighthouse\Schema\Directives\RenameArgsDirective::Nuwave\Lighthouse\Schema\Directives\{closure}(null, array(1), instance of Nuwave\Lighthouse\Schema\Context, instance of GraphQL\Type\Definition\ResolveInfo)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\nuwave\lighthouse\src\Schema\Directives\ArgTraversalDirective.php",
    "line": 29,
    "call": "Nuwave\Lighthouse\Schema\Directives\SpreadDirective::Nuwave\Lighthouse\Schema\Directives\{closure}(null, array(1), instance of Nuwave\Lighthouse\Schema\Context, instance of GraphQL\Type\Definition\ResolveInfo)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\nuwave\lighthouse\src\Validation\ValidateDirective.php",
    "line": 60,
    "call": "Nuwave\Lighthouse\Schema\Directives\ArgTraversalDirective::Nuwave\Lighthouse\Schema\Directives\{closure}(null, array(1), instance of Nuwave\Lighthouse\Schema\Context, instance of GraphQL\Type\Definition\ResolveInfo)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\nuwave\lighthouse\src\Schema\Directives\ArgTraversalDirective.php",
    "line": 29,
    "call": "Nuwave\Lighthouse\Validation\ValidateDirective::Nuwave\Lighthouse\Validation\{closure}(null, array(1), instance of Nuwave\Lighthouse\Schema\Context, instance of GraphQL\Type\Definition\ResolveInfo)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\nuwave\lighthouse\src\Schema\Directives\TrimDirective.php",
    "line": 56,
    "call": "Nuwave\Lighthouse\Schema\Directives\ArgTraversalDirective::Nuwave\Lighthouse\Schema\Directives\{closure}(null, array(1), instance of Nuwave\Lighthouse\Schema\Context, instance of GraphQL\Type\Definition\ResolveInfo)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\nuwave\lighthouse\src\Schema\Factories\FieldFactory.php",
    "line": 92,
    "call": "Nuwave\Lighthouse\Schema\Directives\TrimDirective::Nuwave\Lighthouse\Schema\Directives\{closure}(null, array(1), instance of Nuwave\Lighthouse\Schema\Context, instance of GraphQL\Type\Definition\ResolveInfo)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\webonyx\graphql-php\src\Executor\ReferenceExecutor.php",
    "line": 623,
    "call": "Nuwave\Lighthouse\Schema\Factories\FieldFactory::Nuwave\Lighthouse\Schema\Factories\{closure}(null, array(1), instance of Nuwave\Lighthouse\Schema\Context, instance of GraphQL\Type\Definition\ResolveInfo)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\webonyx\graphql-php\src\Executor\ReferenceExecutor.php",
    "line": 550,
    "call": "GraphQL\Executor\ReferenceExecutor::resolveFieldValueOrError(instance of GraphQL\Type\Definition\FieldDefinition, instance of GraphQL\Language\AST\FieldNode, instance of Closure, null, instance of GraphQL\Type\Definition\ResolveInfo)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\webonyx\graphql-php\src\Executor\ReferenceExecutor.php",
    "line": 474,
    "call": "GraphQL\Executor\ReferenceExecutor::resolveField(GraphQLType: Mutation, null, instance of ArrayObject(1), array(1))"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\webonyx\graphql-php\src\Executor\ReferenceExecutor.php",
    "line": 857,
    "call": "GraphQL\Executor\ReferenceExecutor::GraphQL\Executor\{closure}(array(0), 'customerRegister')"
    },
    {
    "call": "GraphQL\Executor\ReferenceExecutor::GraphQL\Executor\{closure}(array(0), 'customerRegister')"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\webonyx\graphql-php\src\Executor\ReferenceExecutor.php",
    "line": 859,
    "function": "array_reduce(array(1), instance of Closure, array(0))"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\webonyx\graphql-php\src\Executor\ReferenceExecutor.php",
    "line": 490,
    "call": "GraphQL\Executor\ReferenceExecutor::promiseReduce(array(1), instance of Closure, array(0))"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\webonyx\graphql-php\src\Executor\ReferenceExecutor.php",
    "line": 263,
    "call": "GraphQL\Executor\ReferenceExecutor::executeFieldsSerially(GraphQLType: Mutation, null, array(0), instance of ArrayObject(1))"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\webonyx\graphql-php\src\Executor\ReferenceExecutor.php",
    "line": 215,
    "call": "GraphQL\Executor\ReferenceExecutor::executeOperation(instance of GraphQL\Language\AST\OperationDefinitionNode, null)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\webonyx\graphql-php\src\Executor\Executor.php",
    "line": 156,
    "call": "GraphQL\Executor\ReferenceExecutor::doExecute()"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\webonyx\graphql-php\src\GraphQL.php",
    "line": 162,
    "call": "GraphQL\Executor\Executor::promiseToExecute(instance of GraphQL\Executor\Promise\Adapter\SyncPromiseAdapter, instance of GraphQL\Type\Schema, instance of GraphQL\Language\AST\DocumentNode, null, instance of Nuwave\Lighthouse\Schema\Context, array(5), 'customerRegister', null)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\webonyx\graphql-php\src\GraphQL.php",
    "line": 94,
    "call": "GraphQL\GraphQL::promiseToExecute(instance of GraphQL\Executor\Promise\Adapter\SyncPromiseAdapter, instance of GraphQL\Type\Schema, instance of GraphQL\Language\AST\DocumentNode, null, instance of Nuwave\Lighthouse\Schema\Context, array(5), 'customerRegister', null, array(29))"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\nuwave\lighthouse\src\GraphQL.php",
    "line": 213,
    "call": "GraphQL\GraphQL::executeQuery(instance of GraphQL\Type\Schema, instance of GraphQL\Language\AST\DocumentNode, null, instance of Nuwave\Lighthouse\Schema\Context, array(5), 'customerRegister', null, array(29))"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\nuwave\lighthouse\src\GraphQL.php",
    "line": 164,
    "call": "Nuwave\Lighthouse\GraphQL::executeQuery(instance of GraphQL\Language\AST\DocumentNode, instance of Nuwave\Lighthouse\Schema\Context, array(5), null, 'customerRegister')"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\nuwave\lighthouse\src\GraphQL.php",
    "line": 118,
    "call": "Nuwave\Lighthouse\GraphQL::executeOperation(instance of GraphQL\Server\OperationParams, instance of Nuwave\Lighthouse\Schema\Context)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\nuwave\lighthouse\src\Support\Utils.php",
    "line": 98,
    "call": "Nuwave\Lighthouse\GraphQL::Nuwave\Lighthouse\{closure}(instance of GraphQL\Server\OperationParams)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\nuwave\lighthouse\src\GraphQL.php",
    "line": 117,
    "call": "Nuwave\Lighthouse\Support\Utils::applyEach(instance of Closure, instance of GraphQL\Server\OperationParams)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\nuwave\lighthouse\src\Support\Http\Controllers\GraphQLController.php",
    "line": 32,
    "call": "Nuwave\Lighthouse\GraphQL::executeOperationOrOperations(instance of GraphQL\Server\OperationParams, instance of Nuwave\Lighthouse\Schema\Context)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\laravel\framework\src\Illuminate\Routing\ControllerDispatcher.php",
    "line": 48,
    "call": "Nuwave\Lighthouse\Support\Http\Controllers\GraphQLController::__invoke(instance of Illuminate\Http\Request, instance of Nuwave\Lighthouse\GraphQL, instance of Illuminate\Events\Dispatcher, instance of Laragraph\Utils\RequestParser, instance of Nuwave\Lighthouse\Execution\SingleResponse, instance of Nuwave\Lighthouse\Execution\ContextFactory)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\laravel\framework\src\Illuminate\Routing\Route.php",
    "line": 239,
    "call": "Illuminate\Routing\ControllerDispatcher::dispatch(instance of Illuminate\Routing\Route, instance of Nuwave\Lighthouse\Support\Http\Controllers\GraphQLController, '__invoke')"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\laravel\framework\src\Illuminate\Routing\Route.php",
    "line": 196,
    "call": "Illuminate\Routing\Route::runController()"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\laravel\framework\src\Illuminate\Routing\Router.php",
    "line": 685,
    "call": "Illuminate\Routing\Route::run()"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php",
    "line": 128,
    "call": "Illuminate\Routing\Router::Illuminate\Routing\{closure}(instance of Illuminate\Http\Request)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\nuwave\lighthouse\src\Support\Http\Middleware\AttemptAuthentication.php",
    "line": 32,
    "call": "Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}(instance of Illuminate\Http\Request)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php",
    "line": 167,
    "call": "Nuwave\Lighthouse\Support\Http\Middleware\AttemptAuthentication::handle(instance of Illuminate\Http\Request, instance of Closure)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\nuwave\lighthouse\src\Support\Http\Middleware\AcceptJson.php",
    "line": 27,
    "call": "Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}(instance of Illuminate\Http\Request)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php",
    "line": 167,
    "call": "Nuwave\Lighthouse\Support\Http\Middleware\AcceptJson::handle(instance of Illuminate\Http\Request, instance of Closure)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php",
    "line": 103,
    "call": "Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}(instance of Illuminate\Http\Request)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\laravel\framework\src\Illuminate\Routing\Router.php",
    "line": 687,
    "call": "Illuminate\Pipeline\Pipeline::then(instance of Closure)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\laravel\framework\src\Illuminate\Routing\Router.php",
    "line": 662,
    "call": "Illuminate\Routing\Router::runRouteWithinStack(instance of Illuminate\Routing\Route, instance of Illuminate\Http\Request)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\laravel\framework\src\Illuminate\Routing\Router.php",
    "line": 628,
    "call": "Illuminate\Routing\Router::runRoute(instance of Illuminate\Http\Request, instance of Illuminate\Routing\Route)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\laravel\framework\src\Illuminate\Routing\Router.php",
    "line": 617,
    "call": "Illuminate\Routing\Router::dispatchToRoute(instance of Illuminate\Http\Request)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php",
    "line": 165,
    "call": "Illuminate\Routing\Router::dispatch(instance of Illuminate\Http\Request)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php",
    "line": 128,
    "call": "Illuminate\Foundation\Http\Kernel::Illuminate\Foundation\Http\{closure}(instance of Illuminate\Http\Request)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\barryvdh\laravel-debugbar\src\Middleware\InjectDebugbar.php",
    "line": 67,
    "call": "Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}(instance of Illuminate\Http\Request)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php",
    "line": 167,
    "call": "Barryvdh\Debugbar\Middleware\InjectDebugbar::handle(instance of Illuminate\Http\Request, instance of Closure)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\laravel\framework\src\Illuminate\Session\Middleware\StartSession.php",
    "line": 116,
    "call": "Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}(instance of Illuminate\Http\Request)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\laravel\framework\src\Illuminate\Session\Middleware\StartSession.php",
    "line": 62,
    "call": "Illuminate\Session\Middleware\StartSession::handleStatefulRequest(instance of Illuminate\Http\Request, instance of Illuminate\Session\Store, instance of Closure)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php",
    "line": 167,
    "call": "Illuminate\Session\Middleware\StartSession::handle(instance of Illuminate\Http\Request, instance of Closure)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\laravel\framework\src\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse.php",
    "line": 37,
    "call": "Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}(instance of Illuminate\Http\Request)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php",
    "line": 167,
    "call": "Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::handle(instance of Illuminate\Http\Request, instance of Closure)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\laravel\framework\src\Illuminate\Cookie\Middleware\EncryptCookies.php",
    "line": 67,
    "call": "Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}(instance of Illuminate\Http\Request)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php",
    "line": 167,
    "call": "Illuminate\Cookie\Middleware\EncryptCookies::handle(instance of Illuminate\Http\Request, instance of Closure)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\packages\Webkul\Core\src\Http\Middleware\CheckForMaintenanceMode.php",
    "line": 117,
    "call": "Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}(instance of Illuminate\Http\Request)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php",
    "line": 167,
    "call": "Webkul\Core\Http\Middleware\CheckForMaintenanceMode::handle(instance of Illuminate\Http\Request, instance of Closure)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php",
    "line": 103,
    "call": "Illuminate\Pipeline\Pipeline::Illuminate\Pipeline\{closure}(instance of Illuminate\Http\Request)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php",
    "line": 140,
    "call": "Illuminate\Pipeline\Pipeline::then(instance of Closure)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php",
    "line": 109,
    "call": "Illuminate\Foundation\Http\Kernel::sendRequestThroughRouter(instance of Illuminate\Http\Request)"
    },
    {
    "file": "C:\xampp\htdocs\hemchhaya\public\index.php",
    "line": 74,
    "call": "Illuminate\Foundation\Http\Kernel::handle(instance of Illuminate\Http\Request)"
    }
    ]
    }
    ],
    "data": {
    "customerRegister": null
    }
    }



  • Hello @sudipdig ,
    please tell me where did you define your all variables that you have used in the mutation,
    also you can check the document for this:
    https://devdocs.bagisto.com/1.x/graphql-shop-api/getting-started-with-the-api.html#register-a-new-customer


Log in to reply