Skip to content

Instantly share code, notes, and snippets.

@mczachurski
Created October 10, 2017 18:24
Show Gist options
  • Save mczachurski/2256d4b74a5abe71d213c3cbda533bd3 to your computer and use it in GitHub Desktop.
Save mczachurski/2256d4b74a5abe71d213c3cbda533bd3 to your computer and use it in GitHub Desktop.
builder.RegisterType<GraphQLSchema>().As<ISchema>();
builder.Register<Func<Type, GraphType>>(c =>
{
var context = c.Resolve<IComponentContext>();
return t => {
var res = context.Resolve(t);
return (GraphType)res;
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment