Closed rd-xx closed 3 years ago
Also, why can the (media) trailer property be a string? From the official GraphQL docs it can only be an object (or null)
I just want to know if this is an error or there's an explanation. If this is an error l'd gladly fix it
Also, why can the (media) trailer property be a string? From the official GraphQL docs it can only be an object (or null)
I just want to know if this is an error or there's an explanation. If this is an error l'd gladly fix it
AniList-Node transforms the data a bit to make getting information easier so the return object is not always a 1:1 comparison.
For media.trailer, if it is YouTube or Dailymotion, it will generate the link and use that instead of the object. So it's working as intended. 😃 You can see this in the fetcher function here: https://github.com/Butterstroke/AniList-Node/blob/4f35d3aaa5dad8897b56d0914029f2eb6a3084e1/lib/fetcher.js#L89-L102
AniList-Node transforms the data a bit to make getting information easier so the return object is not always a 1:1 comparison.
For media.trailer, if it is YouTube or Dailymotion, it will generate the link and use that instead of the object. So it's working as intended. 😃 You can see this in the fetcher function here:
Oh okay, didn't know about that. Really cool feature 😃
As said in the commit description: The typings say that PersonRelation's property "name" return an object with 1 property named "english", when in reality it returns a string, we can see it here: https://github.com/Butterstroke/AniList-Node/blob/4f35d3aaa5dad8897b56d0914029f2eb6a3084e1/lib/fetcher.js#L31-L33
As said in the commit description: The typings say that PersonRelation's property "name" return an object with 1 property named "english", when in reality it returns a string, we can see it here: https://github.com/Butterstroke/AniList-Node/blob/4f35d3aaa5dad8897b56d0914029f2eb6a3084e1/lib/fetcher.js#L31-L33
Ah, good catch! Consider this comment approval for that since the PR is already approved for the other changes.
Merged this for a bug fix update soon. Thanks for the work!
Hi, I just started using the lib and noticed a small typo in the Media interface. Proof: