Replies: 9 comments 7 replies
-
Do we need to support these? What's the use-case? Maybe I'm misinterpreting the names but it seems like fragment spreads should be static and |
Beta Was this translation helpful? Give feedback.
-
HooksI love Hooks in React and refactored straight to them when they went into v16, but I'm still a bit uneasy about using them in the Dart ecosystem since the Flutter team seems to be doing everything they can to not implement them as-is, but to make some functional change to how they work (so as not to "copy" React) and then introduce them. At least that's the impression I get from the threads spanning 4 years here and here Not sure I'm ready to refactor to using hooks in my flutter projects, are you planning non-hook functionality as well? |
Beta Was this translation helpful? Give feedback.
-
Variables for FragmentsI think I briefly looked for a way to pass Input fields through to nested fragments in |
Beta Was this translation helpful? Give feedback.
-
This would be so helpful to have! Some ideas:
|
Beta Was this translation helpful? Give feedback.
-
File importsI wonder if there's any way to include file imports in // Parent.dart
class Parent extends HookWidget {
...
@override
Widget build(BuildContext context) {
final result = useQuery$ParentQuery(
graphql(const """
query ParentQuery {
user {
...child_user
}
}
""", [Child.fragment]),
);
return Child(userFrag: result.data.user);
}
// Child.dart
class Child extends StatelessWidget {
final Child_user userFrag;
const Child({Key? key, required this.userFrag}) : super(key: key);
static final fragment = graphql(r'''
fragment child_user on User {
id
name
...child1a_user
...child1b_user
...child1c_user
}
''', [Child1a.fragment, Child1b.fragment, Child1c.fragment]);
@override
Widget build(BuildContext context) {
print(userFrag.data.id); Thoughts? |
Beta Was this translation helpful? Give feedback.
-
A proof of concept is now available on the feature branch! Check the example folder. |
Beta Was this translation helpful? Give feedback.
-
Is this still being worked on or was it just a proof of concept? I really like Relay so wondering if this could be a viable replacement in Dart. |
Beta Was this translation helpful? Give feedback.
-
I hope to pick it up again, but I can not provide a timeline.
…On Thu, Dec 21, 2023 at 1:19 AM Satvik Pendem ***@***.***> wrote:
Is this still being worked on or was it just a proof of concept? I really
like Relay so wondering if this could be a viable replacement in Dart.
—
Reply to this email directly, view it on GitHub
<#142 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA2UFS4EUPCHT76UCMT2AJDYKOFBJAVCNFSM54QD2NF2U5DIOJSWCZC7NNSXTOKENFZWG5LTONUW63SDN5WW2ZLOOQ5TOOJRGM2DSNA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
No worries, have a happy holidays! |
Beta Was this translation helpful? Give feedback.
-
Let's implement a more Relay type builder/client.
Dart Code Analysis
graphql(...)
frompackage:graphql_switch
and generate hooks from that or just from the hook pattern? graphqlnullable
,list
,listNullable
? Directive?GraphQL Code Analysis
graphql_codegen
with special handling of fragments.$key
interface.Serializers:
Linting
Beta Was this translation helpful? Give feedback.
All reactions