Skip to content
Snippets Groups Projects

Decoupled Router Support

Merged Brian Perry requested to merge issue/api_client-3398403:decoupled-router-client into canary
All threads resolved!

Decoupled Router Support:

  • Created decoupled-router-client package
  • Created decoupled-router-client-example
  • Added translatePath method in decoupled-router-client - sources a response from decoupled-router endpoint
  • Added instance of DecoupledRouterClass as property on JsonApiClient
  • Added getResourceByPath method to JsonApiClient
  • Moved getCachedResponse to base class
  • Ensured features like caching, locale, etc. are supported by getResourceByPath method and passed down to DecoupledRoute rClient instance.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Brian Perry added 1 commit

    added 1 commit

    Compare with previous version

  • Brian Perry added 2 commits

    added 2 commits

    • dbec6a22 - 1 commit from branch project:canary
    • 45c1bf3a - Merge branch 'canary' into decoupled-router-client

    Compare with previous version

  • This is really great, awesome work! I noticed when trying to access properties on translatedPath in the example, there was no typescript autocomplete. I think we should be able to know the type at this time and cast the json to the Resolved or Unresolved path object shape.

    I noticed that in getResource and getCollection, I forgot to cast the returned json in some cases to the generic type (I know casting isn't great but this is one of the few times it's needed since we can never know the type returned from fetch/json() But remembering to cast it in all of these places isn't great). Once that is fixed, we should get better types returned from getResourceByPath. Right now all three of those are returning anymost of the time which could be improved.

  • Coby Sher
  • Brian Perry added 6 commits

    added 6 commits

    Compare with previous version

  • Coby Sher resolved all threads

    resolved all threads

  • merged

  • Please register or sign in to reply
    Loading