Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WARNING Configuring `gql_build:serializer_builder` in target `WelcomeApp: WelcomeApp` but this is not a known Builder

I am trying to use Ferry with Flutter using the official documentation . I have placed my schema.graphql into my project and it has auto generated the necessary files, which has enabled me to extract my first query Login no problem.

I have created a build.yaml file to which I have posted the following code....

targets:
  $default:
    builders:
      gql_build|schema_builder:
        enabled: true
      gql_build|ast_builder:
        enabled: true
      gql_build|data_builder:
        enabled: true
        options:
          schema: WelcomeApp|lib/schema.graphql
      gql_build|var_builder:
        enabled: true
        options:
          schema: WelcomeApp|lib/schema.graphql
      gql_build|serializer_builder:     <-------------------ERROR ON THIS LINE
        enabled: true
        options:
          schema: WelcomeApp|lib/schema.graphql

      ferry_generator|req_builder:
        enabled: true
        options:
          schema: WelcomeApp|lib/schema.graphql

And added my query into a file called login.graphql.

However when calling flutter

pub run build_runner watch --delete-conflicting-outputs

it builds some of the autogenerated files associated with the login.schema but the login.req.gql.dart is full of errors. I believe I am missing all the files with the .g.dart extension. I receive the following error associated with line 15 in the build.yaml file....

[WARNING] Configuring `gql_build:serializer_builder` in target `WelcomeApp: WelcomeApp` but this is not a known Builder

I believe the missing files that are not being auto generated are....

login.data.gql.g.dart
login.req.gql.g.dart
login.var.gql.g.dart

Thanks for any help you can provide.

like image 975
rb2030 Avatar asked Oct 13 '25 00:10

rb2030


2 Answers

I solved it by adding gql_build in pubspec.yaml dependencies.

dependencies:
  ferry:
  gql_http_link:
  get: ^4.1.1
  get_storage: ^2.0.1
  get_it:
  gql_build: ^0.1.4+2

dependency_overrides:
  analyzer: ^0.41.2`
like image 143
Sumit Kumar Avatar answered Oct 14 '25 14:10

Sumit Kumar


a few of the builders have been removed, see https://github.com/gql-dart/ferry/blob/master/examples/pokemon_explorer/build.yaml for latest one:

targets:
  $default:
    builders:
      ferry_generator|graphql_builder:
        enabled: true
        options:
          schema: pokemon_explorer|lib/schema.graphql

      ferry_generator|serializer_builder:
        enabled: true
        options:
          schema: pokemon_explorer|lib/schema.graphql
like image 26
tommy chheng Avatar answered Oct 14 '25 14:10

tommy chheng



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!