GraphQL and Reporting Quickstart

GraphQL and Reporting Quickstart

Fast-Weigh GraphQL & REST APIs

 
To add the API module to your Fast-Weigh subscription, contact us at 865-219-2980 or support@tacinsight.com.


GraphQL Query Examples

query GetTrucks($fromDate: smalldatetime!) {
  Truck(where: { LastLoadDate: { _gte: $fromDate } }) {
    TruckID
    LastLoadDate
    TareWeight
    Hauler {
      HaulerID
      HaulerName
    }
  }
}
Query Variables
{
    "fromDate": "2022-02-01"
}


query GetCustomers($state: String) {
  Customer(where: { State: { _eq: $state } }) {
    CustomerID
    CustomerName
    Address1
    Address2
    City
    State
    Zip
    TaxCode {
      Code
    }
  }
}
Query Variables
{
    "state": "TN"
}


query GetOrders {
  Order(where: {Status: {_eq: "A"}}) {
    OrderNumber
    Description
    PONumber
    DefaultJob
    Customer {
      CustomerID
      CustomerName
    }
    OrderProducts {
      Product {
        ProductID
        ProductDescription
      }
      UnitPrice
      FreightRate
    }
  }
}


query GetTickets($FromDate: date!, $ToDate: date!) {
  LoadTicket(
    where: {
      _and: [
        { TicketDate: { _gte: $FromDate } }
        { TicketDate: { _lte: $ToDate } }
      ]
    }
  ) {
    TicketKey
    TicketNumber
    Void
    NetWeight
    TicketDate
    OrderProduct {
      Product {
        ProductKey
        ProductID
        ProductDescription
        UnitOfMeasure
      }
    }
    Order {
      OrderKey
      OrderNumber
      Description
      Customer {
        CustomerKey
        CustomerID
        CustomerName
      }
    }
    Truck {
      TruckKey
      TruckID
      Hauler {
        HaulerKey
        HaulerID
        HaulerName
      }
    }
    RatesAndAmounts {
      MaterialAmountCalculated
      FreightAmountCalculated
      SurchargeAmountCalculated
    }
  }
}
Query Variables
{
    "FromDate": "2022-02-13",
    "ToDate": "2022-02-23"
}



    • Related Articles

    • GraphQL Schema

      Fast-Weigh GraphQL & REST APIs To add the API module to your Fast-Weigh subscription, contact us at 865-219-2980 or support@tacinsight.com. GraphQL provides a live schema via introspection of the API endpoint. That's a nerdy way of saying the ...
    • GraphQL for Developers

      Fast-Weigh GraphQL & REST APIs To add the API module to your Fast-Weigh subscription, contact us at 865-219-2980 or support@tacinsight.com. Info for devs GraphQL queries are handled via standard HTTP. All GraphQL queries are POST requests The first ...
    • GraphQL Crash Course

      Fast-Weigh GraphQL & REST APIs To add the API module to your Fast-Weigh subscription, contact us at 865-219-2980 or support@tacinsight.com. If you are not familiar with GraphQL, no worries. It's easy to learn. If you have experience working with SQL ...
    • Connecting Power BI to GraphQL

      Fast-Weigh GraphQL & REST APIs To add the API module to your Fast-Weigh subscription, contact us at 865-219-2980 or support@tacinsight.com . GraphQL can be connected into Power BI to visualize your data. In order to connect it up, you will need to be ...
    • Connecting GraphQL to Telerik Report Designer

      Fast-Weigh GraphQL & REST APIs To add the API module to your Fast-Weigh subscription, contact us at 865-219-2980 or support@tacinsight.com. Note: Make sure you are running Telerik Report Designer version 14.0.20.219 or later. Navigate to the Data tab ...