forked from realaravinth/libmedium
realaravinth
a1395234e6
I think it is safe to assume that these files will never receive a null value. However, we should collect a bunch of data and verify this assumption. But for now, this means less boilerplate code
64 lines
856 B
GraphQL
64 lines
856 B
GraphQL
type Query {
|
|
post: Post
|
|
}
|
|
|
|
schema {
|
|
query: Query
|
|
}
|
|
|
|
type Paragraphs {
|
|
text: String!
|
|
type: String!
|
|
href: String
|
|
layout: String
|
|
iframe: IFrame
|
|
metadata: MetaData
|
|
markups: [MarkUp! ]!
|
|
}
|
|
|
|
type MarkUp {
|
|
title: String
|
|
type: String!
|
|
href: String
|
|
userId: String
|
|
start: Int!
|
|
end: Int!
|
|
anchorType: String
|
|
}
|
|
|
|
|
|
type IFrame {
|
|
mediaResource: MediaResource
|
|
}
|
|
|
|
type MediaResource{
|
|
href: String!
|
|
iframeSrc: String!
|
|
iframeWidth: Int!
|
|
iframeHeight: Int
|
|
}
|
|
|
|
type MetaData {
|
|
id: String!
|
|
originalWidth: Int!
|
|
originalHeight: Int!
|
|
}
|
|
|
|
|
|
type BodyModel { paragraphs: [Paragraphs! ]! }
|
|
|
|
type Content { bodyModel: BodyModel! }
|
|
|
|
type User { id: String! name: String! }
|
|
|
|
type Post {
|
|
id: ID!
|
|
title: String!
|
|
createdAt: Int!
|
|
content: Content!
|
|
creator: User!
|
|
}
|
|
|
|
type Data { post: Post }
|
|
|
|
type AutogeneratedMainType { data: Data }
|