diff --git a/README.md b/README.md index 762bb895..cc893519 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ This graphql implementation is based on June 2018 spec. - [x] Directives - [x] Include - [x] Skip - - [ ] Custom + - [?] Custom (Requires changing the graphqld source) - [x] Enumerations - [x] Input Objects - [x] Mutations diff --git a/source/graphql/uda.d b/source/graphql/uda.d index 7505ce99..161f7569 100644 --- a/source/graphql/uda.d +++ b/source/graphql/uda.d @@ -161,16 +161,12 @@ template getUdaData(Type) { } template getUdaData(Type, string mem) { - //static if(isBuiltinType!(typeof(__traits(getMember, Type, mem)))) { - // enum getUdaData = GQLDUdaData.init; - //} else { - alias GQLDUdaDataAS = getGQLDUdaData!(Type, mem); - static if(GQLDUdaDataAS.length > 0) { - enum getUdaData = GQLDUdaDataAS[0]; - } else { - enum getUdaData = GQLDUdaData.init; - } - //} + alias GQLDUdaDataAS = getGQLDUdaData!(Type, mem); + static if(GQLDUdaDataAS.length > 0) { + enum getUdaData = GQLDUdaDataAS[0]; + } else { + enum getUdaData = GQLDUdaData.init; + } } unittest { diff --git a/source/graphql/validation/schemabased.d b/source/graphql/validation/schemabased.d index ad233c03..617bc2d3 100644 --- a/source/graphql/validation/schemabased.d +++ b/source/graphql/validation/schemabased.d @@ -747,3 +747,18 @@ unittest { test!void(str); } + +unittest { + string str = ` +{ + starships { + crew { + ... on Humanoid { + doesNotExist + } + } + } +}`; + + test!FieldDoesNotExist(str); +}