Skip to content

Instantly share code, notes, and snippets.

@alapini
Created October 8, 2017 14:25
Show Gist options
  • Save alapini/a5dc808ad69d6209180f00f8135f8c5c to your computer and use it in GitHub Desktop.
Save alapini/a5dc808ad69d6209180f00f8135f8c5c to your computer and use it in GitHub Desktop.
Using the schema to encode multi-language support into a GraphQL API.
type Video implements Node {
id: ID!
translations: VideoMetadataConnection
createdAt: DateTime!
modifiedAt: DateTime!
}
type VideoMetadata implements Node {
id: ID!
title: String!
content: String
locale: LocaleEnum!
createdAt: DateTime!
modifiedAt: DateTime!
}
type LocaleEnum {
en, dk, es, ...etc
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment