fus-marcom / franciscan-react

A new website for Franciscan University of Steubenville built with ReactJS.
https://gcp.franciscan.university
MIT License
171 stars 79 forks source link

fix(/lib/queries/facultyList.js): Changed search string to slug #111

Closed mrcreel closed 6 years ago

mrcreel commented 6 years ago

The original query was a 'whiteboard' build. $slug should have been the original search field. mostly partial fix to issue #110

With the exception of one facultyDepartment, this fixes the multi-word slug issue. "Fine Arts" s the only one that removed the space entirely, instead of replacing it with a hyphen.

The following returns all of the department names and their slugs, showing that Fine Arts is the outsider.

{
  facultyDepartments (first: 100) {
    edges {
      node {
        name
        slug
      }
    }
  }
}
JesseRWeigel commented 6 years ago

Wow, great work! I had so much trouble with this. I had assumed that "name" in this case already corresponded with "slug" like it seems to in some other cases. Thank you!