juancastillo0 / leto

Dart GraphQL server libraries. Utilities, code generator, examples and reference implementation.
https://juancastillo0.github.io/leto/
MIT License
38 stars 6 forks source link

Error: A value of type 'Object?' can't be returned from a function with return type 'Value?' #16

Closed dmitrysdm closed 8 months ago

dmitrysdm commented 8 months ago

Even if i try to run quickstart_server I have got an error:

dart run build_runner build --delete-conflicting-outputs
[INFO] Generating build script completed, took 385ms
[WARNING] /Users/mechanic/.pub-cache/hosted/pub.dev/leto_schema-0.0.1-dev.5/lib/src/type.dart:359:30: Error: A value of type 'Object?' can't be returned from a function with return type 'Value?'.
 - 'Object' is from 'dart:core'.
          (v) => v is Value? ? v : ofType.deserialize(serdeCtx, v),
                             ^
[INFO] Precompiling build script... completed, took 1.1s
[SEVERE] Failed to precompile build script .dart_tool/build/entrypoint/build.dart.
This is likely caused by a misconfigured builder definition.
flutter --version
Flutter 3.16.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision db7ef5bf9f (8 days ago) • 2023-11-15 11:25:44 -0800
Engine • revision 74d16627b9
Tools • Dart 3.2.0 • DevTools 2.28.2

platform: macos 14.1

pubspec.yaml

name: letos
description: A starting point for Dart libraries or applications.
version: 1.0.0
# repository: https://github.com/my_org/my_repo

environment:
  sdk: ^3.2.0

# Add regular dependencies here.
dependencies:
  dart_nats: ^0.6.2
  freezed_annotation: ^2.4.1
  json_annotation: ^4.8.1
  leto: ^0.0.1-dev.2
  leto_shelf: ^0.0.1-dev.2
  shelf: ^1.4.1
  shelf_router: ^1.1.4

dev_dependencies:
  build_runner: ^2.4.6
  freezed: ^2.4.5
  json_serializable: ^6.7.1
  leto_generator: ^0.0.1-dev.4
juancastillo0 commented 8 months ago

Hi thanks for the issue!

I just published leto_schema: ^0.0.1-dev.6 to https://pub.dev/packages/leto_schema

Please let me know if it works for you.

Thanks again!

dmitrysdm commented 8 months ago

I have checked it, it,s working now, thank you. And thank you for this library.