# HG changeset patch # User Theodor Thornhill # Date 1639052213 -3600 # Thu Dec 09 13:16:53 2021 +0100 # Node ID b779068057da4da2ff4dc9be80dd119371684854 # Parent 67934022eafc61685014ba724051f9b46e645b74 Force type-name diff --git a/src/utils.lisp b/src/utils.lisp --- a/src/utils.lisp +++ b/src/utils.lisp @@ -111,7 +111,11 @@ (find-if (lambda (obj) (string= (nameof obj) field-name)) (fields (gethash (nameof object-type) *all-types*))))) -(defclass* gql-object type-name) +(defclass gql-object () + ((type-name + :initarg :type-name + :accessor type-name + :initform (gql-error "Need to supply type name. Consult your schema.")))) (defmacro make-resolvers (&body body) `(let ((ht (make-hash-table :test #'equal)))