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);
        }
 public string PrintFederatedDirectives(IGraphType type)
 {
     if (type.IsInputObjectType())
     {
         return("");
     }
     return(PrintFederatedDirectivesFromAst(type));
 }
Esempio n. 3
0
 public string PrintFederatedDirectives(IGraphType type) => type.IsInputObjectType() ? "" : PrintFederatedDirectivesFromAst(type);
Esempio n. 4
0
        public string PrintFederatedDirectives(IGraphType type)
        {
            Schema?.Initialize();

            return(type.IsInputObjectType() ? "" : PrintFederatedDirectivesFromAst(type));
        }