コード例 #1
0
 private static bool IsObjectScalar(GraphQlFieldType graphQlType)
 {
     graphQlType = UnwrapNonNull(graphQlType);
     return(graphQlType.Kind == GraphQlTypeKindScalar && !graphQlType.IsScalar);
 }
コード例 #2
0
        private static bool IsUnknownObjectScalar(GraphQlType baseType, string valueName, GraphQlFieldType fieldType)
        {
            fieldType = fieldType.UnwrapIfNonNull();

            if (fieldType.Kind != GraphQlTypeKindScalar)
            {
                return(false);
            }

            var netType = ScalarToNetType(baseType, valueName, fieldType);

            return(netType == "object" || netType.TrimEnd().EndsWith("System.Object"));
        }
コード例 #3
0
 private static GraphQlFieldType UnwrapNonNull(GraphQlFieldType graphQlType) =>
 graphQlType.Kind == GraphQlTypeKindNonNull ? graphQlType.OfType : graphQlType;
コード例 #4
0
 private static bool IsObjectScalar(GraphQlFieldType graphQlType)
 {
     graphQlType = UnwrapNonNull(graphQlType);
     return(graphQlType.Kind == GraphQlTypeKindScalar && String.Equals(ScalarToNetType(graphQlType.Name), "object"));
 }