Skip to content
This repository was archived by the owner on Jun 6, 2024. It is now read-only.
This repository was archived by the owner on Jun 6, 2024. It is now read-only.

"NoMethodError: undefined method `end_time=' for nil:NilClass" #34

@letiesperon

Description

@letiesperon

I started getting the following error on one of my mutations when tracing is enabled:

Screenshot 2023-07-12 at 9 27 27 PM
:error => "NoMethodError: undefined method `end_time=' for nil:NilClass",
:backtrace => "/Users/letiesperon/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/apollo-studio-tracing-1.1.0/lib/apollo-studio-tracing/tracer.rb:228

I think it's related to the following nested input type:

module Types
  module Inputs
    class RegistrationAnswerInput < Types::BaseInputObject
      argument :question_id, ID,
               required: true,
               loads: Types::RegistrationQuestionType
      argument :options_ids, [ID],
               required: false,
               loads: Types::RegistrationQuestionOptionType
      argument :answer, String, required: false
    end
  end
end

Here are my mutation variables:

{
  "registrationAttributes": {
      "answers": [
        {
          "questionId": "RegistrationQuestion:WKpFyN",
          "answer":  "some free text answer"
        },
        {
          "questionId": "RegistrationQuestion:Wx8FlW",
          "optionsIds": [
            "RegistrationQuestionOption:5ZyFvm"
          ]
        },
        {
          "questionId": "RegistrationQuestion:DZyFeN",
          "answer": "free text answer"
        }, 
        // ... a couple more...
      ],
      "learnerId": "Learner:4zbuK6",
      "scheduleId": "Schedule:kx3f2e",
      "totalAmountToPayCents": 7200
  }
}

I'm saying that because I see the error right after the n+1 to load the questions is done.
Screenshot 2023-07-12 at 9 34 53 PM

Sorry I can't provide any more help or a PR to fix. I'm really just discovering we were even using the tracing feature and what it is

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions