private static bool IsObjectScalar(GraphQlFieldType graphQlType) { graphQlType = UnwrapNonNull(graphQlType); return(graphQlType.Kind == GraphQlTypeKindScalar && !graphQlType.IsScalar); }
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")); }
private static GraphQlFieldType UnwrapNonNull(GraphQlFieldType graphQlType) => graphQlType.Kind == GraphQlTypeKindNonNull ? graphQlType.OfType : graphQlType;
private static bool IsObjectScalar(GraphQlFieldType graphQlType) { graphQlType = UnwrapNonNull(graphQlType); return(graphQlType.Kind == GraphQlTypeKindScalar && String.Equals(ScalarToNetType(graphQlType.Name), "object")); }