Skip to content

Inline Fragments for interfaces (attempt #2) - #134

Merged
lukemurray merged 6 commits into
EntityGraphQL:masterfrom
bzbetty:fragments-expressiontree
Jul 3, 2022
Merged

lukemurray merged 6 commits into
EntityGraphQL:masterfrom
bzbetty:fragments-expressiontree

Conversation

@bzbetty

@bzbetty bzbetty commented Jun 15, 2022

Copy link
Copy Markdown
Contributor

Different attempt to #133

This one uses expression trees to try get around the issue mentioned in other PR

Sadly it doesn't actually get around it because the dynamic type it returns still has all properties (can't use multiple dynamic types as it throws exception about different return types).

@bzbetty

bzbetty commented Jun 15, 2022

Copy link
Copy Markdown
Contributor Author

update: this now gets around the extra property issue by creating multiple types that inherit dynamically at runtime.

@lukemurray

Copy link
Copy Markdown
Collaborator

Cool. Likely have time to look at this (and others) on the weekend.

I was going to suggest dynamic inheritance or creating a weird "union" type.

Shall I focus on looking at this one and forget attempt 1?

Thanks

@bzbetty

bzbetty commented Jun 15, 2022

Copy link
Copy Markdown
Contributor Author

yeah forget attempt 1, it's simpler but overall don't think it's as good.

however there are a couple of hacks in #2 that might need more cleaning up (ParameterReplacer.cs)

@lukemurray
lukemurray merged commit da4d0ae into EntityGraphQL:master Jul 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants