Const
Factory function to create a Ref schema for the given target schema. Use this in schema definitions to declare reference fields.
const Task = Schema.Struct({ assignee: Type.Ref(Person), // Creates a Ref schema}).pipe(Type.object({ typename: 'Task', version: '0.1.0' })); Copy
const Task = Schema.Struct({ assignee: Type.Ref(Person), // Creates a Ref schema}).pipe(Type.object({ typename: 'Task', version: '0.1.0' }));
Factory function to create a Ref schema for the given target schema. Use this in schema definitions to declare reference fields.