fix: replace DateTime with Date and add gql resolver date name

This commit is contained in:
José Oliveira 2021-09-01 14:59:23 +01:00 committed by Josh Harvey
parent bad3d291ca
commit 0ae8c691c2
5 changed files with 13 additions and 21 deletions

View file

@ -1,6 +1,8 @@
const { GraphQLDateTime } = require('graphql-iso-date')
const { GraphQLJSON, GraphQLJSONObject } = require('graphql-type-json')
GraphQLDateTime.name = 'Date'
const resolvers = {
JSON: GraphQLJSON,
JSONObject: GraphQLJSONObject,

View file

@ -37,8 +37,8 @@ const GET_MACHINE_LOGS_CSV = gql`
query MachineLogs(
$deviceId: ID!
$limit: Int
$from: DateTime
$until: DateTime
$from: Date
$until: Date
$timezone: String
) {
machineLogsCsv(
@ -52,12 +52,7 @@ const GET_MACHINE_LOGS_CSV = gql`
`
const GET_MACHINE_LOGS = gql`
query MachineLogs(
$deviceId: ID!
$limit: Int
$from: DateTime
$until: DateTime
) {
query MachineLogs($deviceId: ID!, $limit: Int, $from: Date, $until: Date) {
machineLogs(
deviceId: $deviceId
limit: $limit

View file

@ -57,12 +57,7 @@ const SHOW_ALL = { code: 'SHOW_ALL', display: 'Show all' }
const NUM_LOG_RESULTS = 500
const GET_CSV = gql`
query ServerData(
$limit: Int
$from: DateTime
$until: DateTime
$timezone: String
) {
query ServerData($limit: Int, $from: Date, $until: Date, $timezone: String) {
serverLogsCsv(
limit: $limit
from: $from
@ -73,7 +68,7 @@ const GET_CSV = gql`
`
const GET_SERVER_DATA = gql`
query ServerData($limit: Int, $from: DateTime, $until: DateTime) {
query ServerData($limit: Int, $from: Date, $until: Date) {
serverVersion
uptime {
name

View file

@ -39,8 +39,8 @@ const TX_SUMMARY = gql`
$txId: ID!
$deviceId: ID!
$limit: Int
$from: DateTime
$until: DateTime
$from: Date
$until: Date
$txClass: String
$timezone: String
) {

View file

@ -34,8 +34,8 @@ const GET_DATA = gql`
const GET_TRANSACTIONS_CSV = gql`
query transactions(
$limit: Int
$from: DateTime
$until: DateTime
$from: Date
$until: Date
$timezone: String
) {
transactionsCsv(
@ -59,8 +59,8 @@ const GET_TRANSACTION_FILTERS = gql`
const GET_TRANSACTIONS = gql`
query transactions(
$limit: Int
$from: DateTime
$until: DateTime
$from: Date
$until: Date
$txClass: String
$machineName: String
$customerName: String