Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing parameter in Angel() in example/main.dart and example/subscription.dart of angel_graphql #18

Open
xrandy00 opened this issue Oct 10, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@xrandy00
Copy link

After cloning the repo and trying to run the example project, both subscription.dart and main.dart throw exception

Unsupported operation: You attempted to perform a reflective action, but you are using ThrowingReflector, a class which disables reflection. Consider using the MirrorsReflector class if you need reflection. Features like controllers, constructor dependency injection, and ioc require reflection, and will not work without it.

For more, see the documentation:
https://docs.angel-dart.dev/guides/dependency-injection#enabling-dart-mirrors-or-other-reflection
#0 ThrowingReflector.reflectClass (package:angel3_container/src/throwing.dart:30:46)
#1 getAnnotation (package:angel3_framework/src/util.dart:23:35)
#2 Service._addRoutesInner (package:angel3_framework/src/core/service.dart:239:18)
#3 Service.addRoutes (package:angel3_framework/src/core/service.dart:231:5)
#4 HookedService.addRoutes (package:angel3_framework/src/core/hooked_service.dart:152:11)
#5 Routable.use (package:angel3_framework/src/core/routable.dart:134:12)
#6 Angel.use (package:angel3_framework/src/core/server.dart:387:18)
#7 main (file:///Users/vojtech.randysek/Work/EmbedIT/Yettel/graphql_dart-master/angel_graphql/example/main.dart:22:25)
#8 _delayEntrypointInvocation. (dart:isolate-patch/isolate_patch.dart:296:19)
#9 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:189:12)

This is caused by not specifying reflector on line 13
https://github.com/dukefirehawk/graphql_dart/blob/master/angel_graphql/example/main.dart

The correct constructor use can be seen here https://pub.dev/packages/angel3_container

@dukefirehawk dukefirehawk added the bug Something isn't working label Oct 29, 2023
@dukefirehawk
Copy link
Collaborator

The issue with the examples have been fixed in angel3_graphql:8.0.1. The two examples should be able to run now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants