You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following Vapor's Validation API, I'm not really sure what is the right way to validate arguments in Graffiti.
I've made the arguments struct conform to Validatable but since I cannot call validate before it's being decode, I'm always getting 'field is required' error.
Hey @itayAmza, I don't think there's a good way to call validate(_ decoder: Decoder) before decode, since fields automatically define the decode block here:
Activity
NeedleInAJayStack commentedon Oct 8, 2021
Hey @itayAmza, I don't think there's a good way to call
validate(_ decoder: Decoder)beforedecode, since fields automatically define the decode block here:Graphiti/Sources/Graphiti/Field/Field/Field.swift
Line 55 in af903a2
I think you have a few options:
Hope that helps!