30 lines
644 B
JavaScript
30 lines
644 B
JavaScript
import {
|
||
GraphQLID,
|
||
GraphQLNonNull,
|
||
GraphQLObjectType,
|
||
GraphQLString,
|
||
} from 'graphql';
|
||
|
||
export default new GraphQLObjectType({
|
||
name: 'File',
|
||
description: 'A stored file.',
|
||
fields: () => ({
|
||
id: {
|
||
description: 'Unique ID.',
|
||
type: GraphQLNonNull(GraphQLID),
|
||
},
|
||
path: {
|
||
description: 'Where it’s stored in the filesystem.',
|
||
type: GraphQLNonNull(GraphQLString),
|
||
},
|
||
filename: {
|
||
description: 'Filename, including extension.',
|
||
type: GraphQLNonNull(GraphQLString),
|
||
},
|
||
mimetype: {
|
||
description: 'MIME type.',
|
||
type: GraphQLNonNull(GraphQLString),
|
||
},
|
||
}),
|
||
});
|