You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The Byte scalar allows us to send binary data from server to client, which is sweet. But, the generated types took some investigation in order to use properly.
For example, the generated type is Scalars['Byte']['output'] which equates to any.
Upon inspecting the source code, should the output type actually be this instead?
typeBufferJson={type: 'Buffer';data: number[]};
This is more useful when creating a Blob on the client, since the data prop is used in the Uint8Array constructor. For example:
// get the `byteBuffer` and `contentType` from your query...constblob=newBlob([newUint8Array(byteBuffer.data)],{type: contentType});// do something with your blob...
Describe the solution you'd like
Do one or all of the following:
Update the docs
Update the generated type
Describe alternatives you've considered
For now, we're using a custom type in our project that mirrors the linked type above.
Additional context
None.
The text was updated successfully, but these errors were encountered:
zach-betz-hln
changed the title
Betters types and/or docs for the Byte scalar
Better types and/or docs for the Byte scalar
Oct 22, 2024
Is your feature request related to a problem? Please describe.
The Byte scalar allows us to send binary data from server to client, which is sweet. But, the generated types took some investigation in order to use properly.
For example, the generated type is
Scalars['Byte']['output']
which equates toany
.Upon inspecting the source code, should the output type actually be this instead?
This is more useful when creating a
Blob
on the client, since thedata
prop is used in theUint8Array
constructor. For example:Describe the solution you'd like
Do one or all of the following:
Describe alternatives you've considered
For now, we're using a custom type in our project that mirrors the linked type above.
Additional context
None.
The text was updated successfully, but these errors were encountered: