[ { "title": "Kim Stanley Robinson", "body": "Author of the Mars trilogy and New York 2140.\r\n", "field_books": [ "2" ] }, { "title": "N. K. Jemisin", "body": "Hugo Award-winning author of the Broken Earth trilogy.\r\n", "field_books": [ "1" ] } ]
{ "attributes": { "nid": 2, "body": { "value": "Winner of the Hugo Award.\r\n", "format": "basic_html", "processed": "\Winner of the Hugo Award.", "summary": "" }, "field_display_name": { "value": "N. K. Jemisin", "format": "basic_html", "processed": "N. K. Jemisin" } }, }
Relationships are complicated /jsonapi/node/[Content Type]?include=[Field Name] for example (we want field_books): /jsonapi/node/author?include=field_books
Aliases and Multiple Queries Take a simple Image Media Bundle entities { entityLabel ... on NodeHotspot { fieldName, title, fieldThumbnailImage { entity { ... on MediaImage { fieldMediaImage { url width height alt title } } } }, } }
This gives us the source image. What about derivatives? fieldThumbnailImage { entity { ... on MediaImage { fieldMediaImage { derivative(style: THUMBNAIL) { url width height } url width height alt title } } }
This gives us the source image. What about derivatives? fieldThumbnailImage { entity { ... on MediaImage { fieldMediaImage { derivative(style: THUMBNAIL) { url width height } url width height alt title } } }
This gives us the source image. What about derivatives? fieldThumbnailImage { entity { ... on MediaImage { fieldMediaImage { derivative(style: THUMBNAIL) { url width height } url width height alt title } } }
This gives us the source image. What about derivatives? fieldThumbnailImage { entity { ... on MediaImage { fieldMediaImage { derivative(style: THUMBNAIL) { url width height } url width height alt title } } }
Web Push API •Gives web applications the ability to receive messages pushed to them from a server •Requires a subscription to be activated, but once allowed, the subscription is saved by the browser
Web Push API •Gives web applications the ability to receive messages pushed to them from a server •Requires a subscription to be activated, but once allowed, the subscription is saved by the browser •You can pass “messages”, but fundamentally you are passing data for your app or website to interpret as you see fit
Web Push API •Gives web applications the ability to receive messages pushed to them from a server •Requires a subscription to be activated, but once allowed, the subscription is saved by the browser •You can pass “messages”, but fundamentally you are passing data for your app or website to interpret as you see fit •Browsers handle pushing the data through Service Workers, so a third party is not required
Fine Print •Limited browser support: ✅ Chrome, ✅ Firefox, " Safari (coming soon?) •Spec is considered experimental, so it may change in the future •Great for kiosks, but in the wild, you can’t guarantee that a user will subscribe
Fine Print •Limited browser support: ✅ Chrome, ✅ Firefox, " Safari (coming soon?) •Spec is considered experimental, so it may change in the future •Great for kiosks, but in the wild, you can’t guarantee that a user will subscribe •Doesn’t help with non-web-based projects (Cinder/ C++, Unity)