Skip to content

Make GraphType optional#103

Merged
SimonCropp merged 32 commits intomasterfrom
optionalGraphType
Mar 17, 2019
Merged

Make GraphType optional#103
SimonCropp merged 32 commits intomasterfrom
optionalGraphType

Conversation

@SimonCropp
Copy link
Copy Markdown
Owner

@SimonCropp SimonCropp commented Mar 17, 2019

  • GraphType is no longer a generic on any methods. instead it is passed as an optional Type parameter.
  • to define a default GraphType, register it at startup using GraphTypeTypeRegistry.Register<Company, CompanyGraph>();

@SimonCropp SimonCropp added this to the 4.0.0 milestone Mar 17, 2019
@SimonCropp SimonCropp merged commit 53e0c13 into master Mar 17, 2019
@SimonCropp SimonCropp deleted the optionalGraphType branch March 17, 2019 11:25
@isabekyan
Copy link
Copy Markdown
Contributor

It seems that something was broken with collection navigation fields in this PR. I get something like
Expected value of type \"Namespace.MyEntityGraph`1[Namespace.Entity]\" for \"Entity\" but got: System.Collections.Generic.HashSet`1[Namespace.Entity]
for any collection field after update...
After update the only change was to replace calls of generic Add...Field to non-generic and passing type of graph param.
Sorry but I had no time to dig into it for more precise info(

@SimonCropp
Copy link
Copy Markdown
Owner Author

Sorry for the hassle. Can u share a minimal repro or a failing unit test?

@isabekyan
Copy link
Copy Markdown
Contributor

Ooops, my bad.. Haven't noticed that generic AddNavigationField for collections was renamed to non-generic AddNavigationListField.
BTW thanks for this project. Wish I had time to contribute.

@SimonCropp
Copy link
Copy Markdown
Owner Author

@isabekyan happy to accept donations via open collective https://github.com/SimonCropp/GraphQL.EntityFramework#community-backed :)

@isabekyan
Copy link
Copy Markdown
Contributor

I'm already in )

@SimonCropp
Copy link
Copy Markdown
Owner Author

Sorry should have checked first. Thanks for the support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants