Comments (3)
adding the missing import MyModel
into serializers.gql.dart
fixes the issue, but I still haven't dug deep enough into built_value
to see why/where it's adding those builder factories, and why it's only doing it for the list item and not the other overrides
from gql.
@danielmahon built_value generates the serializers.gql.g.dart
file based on the contents of your serializers.gql.dart
.
I don't actually think this has anything to do with the custom serializer. built_value is building the BuilderFactories because one of your GraphQL operations uses a BuiltList<MyModel>
, and BuilderFactories are what tell built_value how to serialize BuiltLists of non-standard types.
The easiest solution would be to just include an import of any type overrides by default. I've created PR #148 which implements this. Can you please confirm that it fixes the issue? NOTE: you will need to include your type_overrides map in the serializer_builder in your build.yaml file.
A more elegant solution that selectively imports the custom types only when they will be used in a BuilderFactory would not be trivial, and I think this solution is probably good enough.
from gql.
@smkhalsa this works, thank you
from gql.
Related Issues (20)
- [graphql_transport_ws] The new subprotocol doesn't auto-reconnect HOT 2
- OperationException(linkException: ResponseFormatException(originalException: type 'Null' is not a subtype of type 'String' in type cast HOT 1
- [Begging for support] Can the url be transformed? HOT 2
- [Support request] How can the client complete a subscription HOT 1
- [gql_websocket_link] Crash events on host lookup HOT 3
- LinkException as a sealed class HOT 2
- [WebSocketLink] inactivityTimeout causes a reconnect HOT 5
- More maintainers wanted
- gql_code_builder: allow adding custom builder factories for nested collections
- [gql_websocket_link] uuid package version conflict HOT 1
- [Question] Dio interceptor with retry not triggered when timeout() is invoked HOT 5
- dependencies issue HOT 1
- FR: Dynamic header HOT 1
- Issue with - distinguishing between null and absent values HOT 3
- How to make reconnect TransportWebSocketLink(TransportWsClientOptions())
- [BUG] Printer fails with string blocks HOT 5
- Type exception in gql_websocket_link with decoding incoming messages. HOT 1
- extract serializers from gql_code_builder to another package
- how to set headers in first http1.1 request before connection upgrade for TransportWebSocketLink?
- Random ServerException HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gql.