bradtraversy / spacex_launch_stats Goto Github PK
View Code? Open in Web Editor NEWSpaceX launch history - React, GraphQL, Apollo
SpaceX launch history - React, GraphQL, Apollo
Hello! if you do the launches data query in graphiql and most of your fields return null, here is the explaining and solution.
the tutorial and code has not been mentained with the newer version of the api, if you want the easier solution make sure your link and the docs you are using are the same as the tutorial aka v3. The naming of the fields in Brad's code are the same ones as the v3 SpaceX Api.
with v4/v5 the naming of the fields has changed! instead of mission_name now it is just name for example. you can check whatever data field you want if you open the link from the return.
fields: () => ({ flight_number: {type: GraphQLInt}, name: {type: GraphQLString}, date_local: {type: GraphQLString}, success: {type: GraphQLBoolean}, details:{type: GraphQLString}, links: {type:LinksType}, id: {type: GraphQLString}, })
for the newer versions the code provided in the tutorial throws an error in server.js , this piece should be wrote like this:
const { graphqlHTTP } = require('express-graphql');
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.