# HG changeset patch # User Theodor Thornhill # Date 1638918219 -3600 # Wed Dec 08 00:03:39 2021 +0100 # Node ID be1b9181528ae4790cae8f926917be21bb72c73c # Parent 1f2c24075aafa0e0f426957c8222faf1e03200e8 Delete irrelevant code diff --git a/src/execution.lisp b/src/execution.lisp --- a/src/execution.lisp +++ b/src/execution.lisp @@ -260,10 +260,9 @@ (defun resolve-abstract-type (abstract-type object-value) ;; TODO: https://spec.graphql.org/draft/#ResolveAbstractType() (check-type object-value gql-object) - (let* ((type-name (type-name object-value)) - (object-definition (gethash type-name *all-types*))) + (with-slots (type-name) object-value (etypecase abstract-type - (interface-type-definition object-definition) + (interface-type-definition (gethash type-name *all-types*)) (union-type-definition (let ((union-member (find type-name (union-members abstract-type) :key #'nameof :test #'string=))) diff --git a/t/execution-tests.lisp b/t/execution-tests.lisp --- a/t/execution-tests.lisp +++ b/t/execution-tests.lisp @@ -225,35 +225,8 @@ ((owner :initarg :owner :accessor owner) (nickname :initarg :nickname :accessor nickname))) - (defclass cat (pet) - ((nickname :initarg :nickname :accessor nickname))) - - (defclass sentient (gql-object) - ((name :initarg :name :accessor name))) - - (defclass human (sentient) - ((pets :initarg :pets :accessor pets))) - (defparameter *doggo* - (make-instance - 'dog - :name "Bingo-Bongo" - :type-name "Dog" - :nickname "Hund!" - :owner (make-instance - 'human - :name "Wingle Wangle" - :type-name "Human" - :pets `(,(make-instance - 'dog - :name "Bingo-Bongo" - :nickname "Hund!" - :type-name "Dog") - ,(make-instance - 'cat - :name "Bango-Wango" - :nickname "Mjausig" - :type-name "Cat"))))) + (make-instance 'dog :name "Bingo-Bongo" :type-name "Dog")) (with-schema (build-schema (asdf:system-relative-pathname 'gql-tests #p"t/test-files/validation-schema.graphql")) ;; We want to know if we did get the actual same reference.