private void InitializeField(FieldConfig config, Type parentType) { config.ResolverAccessor ??= parentType.ToAccessor(config.Name, ResolverType.Resolver); if (config.ResolverAccessor != null) { config.Resolver = new AccessorFieldResolver(config.ResolverAccessor, ServiceProvider); var attrs = config.ResolverAccessor.GetAttributes <GraphQLAttribute>(); if (attrs != null) { foreach (var a in attrs) { a.Modify(config); } } } }
private QueryArguments ToQueryArguments(FieldConfig fieldConfig, List <GraphQLInputValueDefinition> arguments) { return(arguments == null ? new QueryArguments() : new QueryArguments(arguments.Select(a => ToArgument(fieldConfig.ArgumentFor((string)a.Name.Value), a)))); }