Closed ZirgVoice closed 1 year ago
@ZirgVoice how are you defining AddressFilter
in the schema? Is it an input type?
Also, are you declaring AddressFilter
before or after Country
? Does it work if you change the order?
Yes AddressFilter
is declared as input type and in SchemaBuilder
it is declared before Country
. I tried to declare it after Country
but it doesn't help, and in PartialSchema
the order shouldn't matter.
@ZirgVoice I just tried multiple times to reproduce your issue, but I was unable to. Are you using the latest release?
Can you provide more information about how you're declaring AddressFilter
in the schema.
Yes, I am using the latest release This is how AddressFilter is declared
Input(AddressFilter.self) {
InputField("addressILIKE", at: \.addressILIKE)
.description("Inaccurate search by address")
InputField("zipCodeEQ", at: \.zipCodeEQ)
.description("Equal to zipCode")
InputField("zipCodeNEQ", at: \.zipCodeNEQ)
.description("Not equal to zipCode")
InputField("cityEQ", at: \.cityEQ)
.description("Equal to city")
InputField("cityNEQ", at: \.cityNEQ)
.description("Not equal to city")
InputField("longitudeEQ", at: \.longitudeEQ)
.description("Equal to longitude")
InputField("longitudeNEQ", at: \.longitudeNEQ)
.description("Not equal to longitude")
InputField("longitudeGT", at: \.longitudeGT)
.description("Great than longitude")
InputField("longitudeGTE", at: \.longitudeGTE)
.description("Great or equal than longitude")
InputField("longitudeLT", at: \.longitudeLT)
.description("Less than longitude")
InputField("longitudeLTE", at: \.longitudeLTE)
.description("Less or equal than longitude")
InputField("latitudeEQ", at: \.latitudeEQ)
.description("Equal to latitude")
InputField("latitudeNEQ", at: \.latitudeNEQ)
.description("Not equal to latitude")
InputField("latitudeGT", at: \.latitudeGT)
.description("Great than latitude")
InputField("latitudeGTE", at: \.latitudeGTE)
.description("Great or equal than latitude")
InputField("latitudeLT", at: \.latitudeLT)
.description("Less than latitude")
InputField("latitudeLTE", at: \.latitudeLTE)
.description("Less or equal than latitude")
InputField("countryIDEQ", at: \.gCountryIDEQ)
.description("Equal to countryID")
InputField("countryIDNEQ", at: \.gCountryIDNEQ)
.description("Not equal to countryID")
}
It all worked, restarting xcode helped. Sorry for the inconvenience (:
I have a type that has a field that takes an argument. The problem is that when I add arguments to such a field, the scheme does not work. When running
npx diagnose-endpoint
it writes"Unknown kind of type: AddressFilter"
. Thefiltering
argument has the typeAddressFilter
, which is lobbed into the scheme. At the same timeAddressFilter
is also inquery
and there it works Example of type:If I don't use PartialSchema and write the whole thing in one file, it works