Giter VIP home page Giter VIP logo

Comments (3)

spawnia avatar spawnia commented on July 23, 2024

First of all, let me say that I am joyous that someone actually tried using this library 🎉

Do you have a stacktrace, where does the error come from?

from sailor.

JanTvrdik avatar JanTvrdik commented on July 23, 2024

The error comes from Spawnia\Sailor\Codegen\Generator::ensureOperationsAreNamed.

In Generator.php line 158:

  [GraphQL\Error\Error]
  Found unsupported definition in /src/gql/linkableByUrlQuery.graphql


Exception trace:
  at /src/vendor/spawnia/sailor/src/Codegen/Generator.php:158
 Spawnia\Sailor\Codegen\Generator::ensureOperationsAreNamed() at /src/vendor/spawnia/sailor/src/Codegen/Generator.php:186
 Spawnia\Sailor\Codegen\Generator->parsedDocuments() at /src/vendor/spawnia/sailor/src/Codegen/Generator.php:43
 Spawnia\Sailor\Codegen\Generator->generate() at /src/vendor/spawnia/sailor/src/Console/CodegenCommand.php:41
 Spawnia\Sailor\Console\CodegenCommand->execute() at /src/vendor/symfony/console/Command/Command.php:258
 Symfony\Component\Console\Command\Command->run() at /src/vendor/symfony/console/Application.php:911
 Symfony\Component\Console\Application->doRunCommand() at /src/vendor/symfony/console/Application.php:264
 Symfony\Component\Console\Application->doRun() at /src/vendor/symfony/console/Application.php:140
 Symfony\Component\Console\Application->run() at /src/vendor/spawnia/sailor/sailor:24

If I comment out the call to ensureOperationsAreNamed() I get a different error

In OperationSet.php line 52:

  [Exception]
  The selection stack was unexpectedly empty.


Exception trace:
  at /src/vendor/spawnia/sailor/src/Codegen/OperationSet.php:52
 Spawnia\Sailor\Codegen\OperationSet->peekSelection() at /src/vendor/spawnia/sailor/src/Codegen/ClassGenerator.php:212
 Spawnia\Sailor\Codegen\ClassGenerator->Spawnia\Sailor\Codegen\{closure}() at /src/vendor/webonyx/graphql-php/src/Language/Visitor.php:470
 GraphQL\Language\Visitor::GraphQL\Language\{closure}() at /src/vendor/webonyx/graphql-php/src/Language/Visitor.php:277
 GraphQL\Language\Visitor::visit() at /src/vendor/spawnia/sailor/src/Codegen/ClassGenerator.php:269
 Spawnia\Sailor\Codegen\ClassGenerator->generate() at /src/vendor/spawnia/sailor/src/Codegen/Generator.php:54
 Spawnia\Sailor\Codegen\Generator->generate() at /src/vendor/spawnia/sailor/src/Console/CodegenCommand.php:41
 Spawnia\Sailor\Console\CodegenCommand->execute() at /src/vendor/symfony/console/Command/Command.php:258
 Symfony\Component\Console\Command\Command->run() at /src/vendor/symfony/console/Application.php:911
 Symfony\Component\Console\Application->doRunCommand() at /src/vendor/symfony/console/Application.php:264
 Symfony\Component\Console\Application->doRun() at /src/vendor/symfony/console/Application.php:140
 Symfony\Component\Console\Application->run() at /src/vendor/spawnia/sailor/sailor:24

from sailor.

spawnia avatar spawnia commented on July 23, 2024

Supported with https://github.com/spawnia/sailor/releases/tag/v0.20.0

from sailor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.