Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { interfaceType } from "nexus";
export const Node = interfaceType({
name: "Node",
description: "A Node is a resource with a globally unique identifier",
definition(t) {
t.id("id", {
description: "Unique identifier for the object.",
resolve: o => o.id
});
t.string("object", {
description: "String representing the object's type.",
resolve: o => o.object
});
t.resolveType(() => null);
}
});
import { interfaceType } from "nexus";
export const ProductInterface = interfaceType({
name: "Product",
definition(t) {
t.id("id", { description: "Unique identifier for the object." });
t.string("object", {
description:
"String representing the object’s type. Objects of the same type share the same value."
});
t.boolean("active", {
description: "Whether the product is currently available for purchase."
});
t.int("created", {
description:
"Time at which the object was created. Measured in seconds since the Unix epoch."
});
t.boolean("livemode", {
description: