Open Weakky opened 4 years ago
@schickling if you could share a snippet of your use-case that would be helpful
Please treat this as "pseudo code" (i.e. not my "dream API")
schema.objectType({
name: 'SpotifyTrack',
rootTyping: 'SpotifyTrack',
definition(t) {
t.exposeRootFields('*')
// could also be individual fields
// t.exposeRootFields(['id', 'title'])
},
})
Description
When plugging external data-sources into your GraphQL API, it might become fairly cumbersome to convert/map all the TS types of that datasource to actual Nexus GraphQL types.
Ideas
1) Small utility tools to convert TS types to Nexus GraphQL types
2)
nexus-prisma
for TS typesschema is no longer the Prisma Schema but some TypeScript types.