private bool IsEntity(IGraphType type) { if (type.IsInputObjectType()) { return(false); } var directive = type.GetExtensionDirectives <ASTNode>().Directive("key"); if (directive != null) { return(true); } var ast = type.GetAstType <IHasDirectivesNode>(); if (ast == null) { return(false); } var keyDir = ast.Directives.Directive("key"); return(keyDir != null); }