Skip to content

Instantly share code, notes, and snippets.

@brygrill
Last active January 23, 2018 19:03
Show Gist options
  • Save brygrill/a6a386ba7a87c8b34297aeecfd8d5827 to your computer and use it in GitHub Desktop.
Save brygrill/a6a386ba7a87c8b34297aeecfd8d5827 to your computer and use it in GitHub Desktop.
new GraphQLScalarType({
// Thanks:
// https://github.com/ghengeveld/graphql-geojson/blob/master/index.js#L46
// https://github.com/apollographql/graphql-tools/blob/master/docs/source/scalars.md
name: 'Coordinates',
description: 'A set of coordinates. x, y',
parseValue(value) {
return value;
},
serialize(value) {
return value;
},
parseLiteral(ast) {
return ast.value;
},
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment