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

Alternate attributes #1

Open
ronnyek opened this issue Dec 6, 2016 · 0 comments
Open

Alternate attributes #1

ronnyek opened this issue Dec 6, 2016 · 0 comments

Comments

@ronnyek
Copy link

ronnyek commented Dec 6, 2016

Hello... I ventured down a very similar path, although to no where near the success it appears you've reached with your library.

In an effort to integrate your library into a project I'm working on, and maintain the integrity of the code I wondered what your thoughts on the following might be... (and these are contributions I'd be more than happy to make). Apologies for the list

  1. Some sort of static set of settings where I could do things like provide an alternate attribute and a func for converting from my attribute to yours. I feel like this could allow for better integration into existing code bases and preventing a bunch of duplicate markup.

instead of [GraphQlObject] I could mark up my own entity with say GraphQlRepository... and be able to translate like so
GraphQlSettings.Register<T,RT>(RT myattributeType, Func<RT,T> converter) which would tell GraphQl.Annotations to look up my replacement, and pass it to the func Id have to specify to kick out a GraphQlObject, which would then be used as if it was never touched.

  1. Some option to allow for including every field as a GraphQlField unless marked with some ignore.

  2. Can you think of anyway to achieve the equivalent of the QueryRoot concept but dynamically? Eg, I'm not using entity framework and thus dont have a single "context" but could easily build list of types to include as links off the root.

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

No branches or pull requests

1 participant