PROVIDENCE, R.I. — General Treasurer and gubernatorial candidate Gina Raimondo must give a deposition in a lawsuit over the deal that gave ex-Red Sox pitcher Curt Schilling’s video game company a $75 million state-backed loan, a Rhode Island judge said Friday.

Raimondo was not in office when the agency formerly known as the Economic Development Corp. approved the loan guarantee for 38 Studios, and she opposed it when she was running for treasurer.

But an attorney for one of the defendants in the suit, former EDC Executive Director Keith Stokes, wants to question her about communications she had with Stokes and others at the agency while she was a candidate. David Martland subpoenaed her last week.

During a hearing Friday in Superior Court, Raimondo attorney Raymond Marcaccio argued the subpoena should be quashed, saying his client has information that is “quite limited” and not relevant or significant to the case. He called her a bystander and proposed that she answer written questions.

But Martland said she shouldn’t be treated differently than any other witness. He indicated Raimondo had had communications with EDC board member George Nee regarding her concerns about the deal, and had also met with Stokes and former agency lawyer Robert Stolzman. Stolzman is also named in the EDC’s suit.

38 Studios went bankrupt in 2012. The state remains on the hook for some $89 million related to the transaction.

After hearing arguments, Judge Michael Silverstein called it appropriate for Raimondo to give a deposition.