Gatsby source plugin to facilitate accessing the ton of content of the Marvel API
The marvel API contains different entities and there are connections in (almost) every imaginable way. To get started you need to create your developer access
The plugin tries to facilitate constructing queries by letting you describe the resources you need. You still need to be a bit familiar with the API in order to know which filters you are allowed to use, and the different connections between the entities
Specifying resources along with an entity will retrieve all the available information for each resource connected to the entity filter. For example the example will retrieve all the available events associated with Thor. If you don't specify the resources then you only the first 20 results of each connection with the bare minimum information (as it happens on the marvel API)
{ resolve: "gatsby-source-marvel", options: { publicKey: '---', privateKey: '---', limit: 100, queries: [ { entity: 'characters', entityFilter: { name: 'Spider-Man', }, resources: ['events'], }, { entity: 'comics', entityFilter: { titleStartsWith: 'Civil War II', }, resources: ['characters'], }, ], } }
The source plugin will create (depending on the configuration) the available nodes grouped by entity.
Available nodes are:
allComicsNode( filter: { characters : { elemMatch: { name: {in: ["Captain America", "Iron Man"]} } } } ) { edges { node { title thumbnail { path extension } prices { type price } characters { name } } } }
I'll be trying to work on these problems soon. If you find a bug, thought of a feature or even want to share the cool usage of this plugin then you are welcome to create an issue
Earth's Mightiest Heroes joined forces to take on threats that were too big for any one hero to tackle. With a roster that has included Captain America, Iron Man, Ant-Man, Hulk, Thor, Wasp and dozens more over the years, the Avengers have come to be regarded as Earth's No. 1 team.
Vowing to serve his country any way he could, young Steve Rogers took the super soldier serum to become America's one-man army. Fighting for the red, white and blue for over 60 years, Captain America is the living, breathing symbol of freedom and liberty.
Avengers, Captain Marvel (Carol Danvers), Inhumans, Iron Man
Avengers, Captain America, Captain America (Sam Wilson), Captain Marvel (Carol Danvers), Guardians of the Galaxy, Inhumans, Iron Man, Medusa, She-Hulk (Jennifer Walters), Spider-Man, Spider-Man (Miles Morales), Thor (Goddess of Thunder), X-Men
Avengers, Captain Marvel (Carol Danvers), Inhumans, Iron Man, S.H.I.E.L.D.
Captain Marvel (Carol Danvers), Hulk, Iron Man
Captain Marvel (Carol Danvers), Hawkeye, Iron Man
Captain Marvel (Carol Danvers), Inhumans, Iron Man
Captain America, Captain Marvel (Carol Danvers), Iron Man, Spider-Man (Miles Morales)
Avengers, Captain America, Captain Marvel (Carol Danvers), Hulk, Inhumans, Iron Man, Karnak
Captain America, Captain Marvel (Carol Danvers), Hercules, Medusa, Spider-Man
Captain America, Captain Marvel (Carol Danvers), Inhumans, Iron Man, Spider-Man (Miles Morales)