Skip to content

fix: swapi.tech execution by normalizing as best as possible #236

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

acao
Copy link
Member

@acao acao commented Jan 14, 2025

  • sometimes we get data.result or data.results
  • sometimes we get obj.properties or just obj
  • sometimes the domains are inconsistent (www. or root)
  • in some cases, we are missing data with the new datasource, such as starship.pilots (and thus character.starships)

I fixed it as readily as possible in download, and "patched" it at API resolution

using this query for testing

{
  allFilms {
    edges {
      node {
        id
        title
        characterConnection {
          characters {
            id
            name
          }
        }
      }
    }
  }
  film(filmID: 6) {
    id
    title
  }
  allStarships {
    edges {
      node {
        id
        name
        pilotConnection {
          pilots {
            id
            name
          }
        }
      }
    }
  }
  film(filmID: 6) {
    id
    title
  }
}

the long term solution is to build our own static datasource in a typescript file, as the json is quite repetetive and cumbersome. I will work on this after we get the typescript rewrite/tooling update merge

@acao acao changed the title fix: swapi tech execution by normalizing as best as possible fix: swapi.tech execution by normalizing as best as possible Jan 14, 2025
@acao acao merged commit be7b3e1 into master Jan 14, 2025
2 checks passed
@acao acao mentioned this pull request Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant