Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export async function provideHoverInfo({
position,
model,
schema
}: ProviderItemInput): Promise {
const graphQLPosition = new GraphQLPosition(
position.lineNumber - 1,
position.column,
);
graphQLPosition.setCharacter(position.column);
graphQLPosition.line = position.lineNumber - 1;
const hoverInfo = getHoverInformation(
schema,
model.getValue(),
graphQLPosition,
);
if (!hoverInfo) {
return {
contents: [],
};
}
return {
contents: [{ value: `${hoverInfo}` }],
};
}