I have no idea if this is right

This commit is contained in:
DMehaffy 2019-04-05 07:45:56 -07:00
parent 88e1ce2c57
commit f92f76dd59

View File

@ -18,6 +18,12 @@ const postModel = {
type: 'string',
},
},
{
name: 'bigint',
params: {
type: 'biginteger'
},
},
],
connection: 'default',
name: 'post',
@ -69,7 +75,7 @@ describe('Test Graphql API End to End', () => {
});
describe('Test CRUD', () => {
const postsPayload = [{ name: 'post 1' }, { name: 'post 2' }];
const postsPayload = [{ name: 'post 1', bigint: 1316130638171 }, { name: 'post 2', bigint: 1416130639261 }];
let data = {
posts: [],
};
@ -81,6 +87,7 @@ describe('Test Graphql API End to End', () => {
createPost(input: $input) {
post {
name
bigint
}
}
}
@ -111,6 +118,7 @@ describe('Test Graphql API End to End', () => {
posts {
id
name
bigint
}
}
`,
@ -136,6 +144,7 @@ describe('Test Graphql API End to End', () => {
posts(limit: 1) {
id
name
bigint
}
}
`,
@ -156,6 +165,7 @@ describe('Test Graphql API End to End', () => {
posts(sort: "name:desc") {
id
name
bigint
}
}
`,
@ -176,6 +186,7 @@ describe('Test Graphql API End to End', () => {
posts(start: 1) {
id
name
bigint
}
}
`,
@ -193,18 +204,21 @@ describe('Test Graphql API End to End', () => {
[
{
name: 'post 1',
bigint: 1316130638171,
},
[postsPayload[0]],
],
[
{
name_eq: 'post 1',
bigint_eq: 1316130638171,
},
[postsPayload[0]],
],
[
{
name_ne: 'post 1',
bigint_ne: 1316130638171,
},
[postsPayload[1]],
],
@ -235,12 +249,14 @@ describe('Test Graphql API End to End', () => {
[
{
name_in: ['post 1', 'post 2'],
bigint_in: [1316130638171, 1416130639261],
},
postsPayload,
],
[
{
name_nin: ['post 2'],
bigint_nin: [1416130639261],
},
[postsPayload[0]],
],
@ -250,6 +266,7 @@ describe('Test Graphql API End to End', () => {
query findPosts($where: JSON) {
posts(where: $where) {
name
bigint
}
}
`,
@ -273,6 +290,7 @@ describe('Test Graphql API End to End', () => {
post(id: $id) {
id
name
bigint
}
}
`,
@ -298,6 +316,7 @@ describe('Test Graphql API End to End', () => {
post {
id
name
bigint
}
}
}
@ -337,6 +356,7 @@ describe('Test Graphql API End to End', () => {
deletePost(input: $input) {
post {
name
bigint
}
}
}