FBI director nominee Christopher Wray on Wednesday encouraged members of the Senate to call the FBI if they are ever told by a foreign entity that they have information that could influence the outcome of the election.

"To the members of this committee, any threat or effort to interfere with our elections from any nation state, or any non-state actor, is the kind of thing the FBI would want to know," Wray said to members of the Senate Judiciary Committee.

Wray said that after Sen. Lindsey Graham, R-S.C., encouraged him to tell everyone in Congress how to handle these sorts of events, after Donald Trump Jr. released an email showing that he wanted to learn what incriminating information a Russian lawyer might have on Hillary Clinton.

"Here's what I want you to tell every politician. If you get a call from somebody suggesting that a foreign government wants to help you by disparaging your opponent, tell us all to call the FBI," Graham said. He later said he liked Wray's answer.

President Trump nominated Wray on June 7 after he fired former FBI Director James Comey. Trump called Wray "a man of impeccable credentials" in a tweet after nominating him.