RickNMortyCompose
rick-and-morty-api
RickNMortyCompose | rick-and-morty-api | |
---|---|---|
14 | 8 | |
25 | 955 | |
- | - | |
3.6 | 0.0 | |
over 2 years ago | 12 months ago | |
Kotlin | JavaScript | |
Apache License 2.0 | BSD 3-clause "New" or "Revised" License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
RickNMortyCompose
-
Facing the Monster: An Analgesic for Relayphobia
// /src/relay/environment.ts import { Store, RecordSource, Environment, Network, Observable, } from "relay-runtime"; import type { FetchFunction, IEnvironment } from "relay-runtime"; const fetchFn: FetchFunction = (params, variables) => { const response = fetch("https://rickandmortyapi.com/graphql/", { method: "POST", headers: [["Content-Type", "application/json"]], body: JSON.stringify({ query: params.text, variables, }), }); return Observable.from(response.then((data) => data.json())); }; export function createEnvironment(): IEnvironment { const network = Network.create(fetchFn); const store = new Store(new RecordSource()); return new Environment({ store, network }); }
-
GraphQL Code Generator with TypeScript, React and Apollo Client
import type { CodegenConfig } from '@graphql-codegen/cli'; const config: CodegenConfig = { overwrite: true, schema: "https://rickandmortyapi.com/graphql", documents: './**/*.graphql', generates: { "src/graphql/generated/graphql.ts": { plugins: ['typescript', 'typescript-operations', 'typescript-react-apollo'], }, config: { withHooks: true } } }; export default config;
-
How to Write a GraphQL Query
export const apolloClient = new ApolloClient({ uri: "https://rickandmortyapi.com/graphql", cache: new InMemoryCache({ typePolicies: { Query: { fields: { characters: { keyArgs: false, merge(existing: Characters, incoming: Characters) { return { ...incoming, results: [ ...(existing?.results || []), ...(incoming?.results || []), ], } satisfies Characters; }, }, }, }, }, }), });
-
Introducing Goctopus: open-source, state-of-the-art GraphQL endpoint discovery & fingerprinting tool.
goctopus -a rickandmortyapi.com _ __ _ ___ ___| |_ ___ _ __ _ _ ___ / _` |/ _ \ / __| __/ _ \| '_ \| | | / __| | (_| | (_) | (__| || (_) | |_) | |_| \__ \ \__, |\___/ \___|\__\___/| .__/ \__,_|___/ v0.0.14 |___/ |_| [INF] Enumerating subdomains for 'rickandmortyapi.com' [INF] Found 5 subdomains for 'rickandmortyapi.com' in 15 seconds 276 milliseconds INFO[0016] Done fingerprinting rickandmortyapi.com INFO[0016] Found: {"authenticated":false,"domain":"rickandmortyapi.com","schema_status":"OPEN","source":"rickandmortyapi.com","url":"https://rickandmortyapi.com/graphql"} INFO[0016] Done. Found 1 graphql endpoints
-
How to upskill my API Testing.
Checkout https://rickandmortyapi.com and their https://rickandmortyapi.com/graphql
-
A Comprehensive Guide to Writing Your First GraphQL Query
import { ApolloClient, InMemoryCache, ApolloProvider } from "@apollo/client"; Import PeopleData from './PeopleData' function App() { const client = new ApolloClient({ cache: new InMemoryCache(), uri: "https://rickandmortyapi.com/graphql", }); return (
-
Getting started with Postman for GraphQL
Back to business: fortunately, Postman has built-in full support for GraphQL! 🎉Let's take a quick tour of the capabilities by exploring the Rick and Morty API. To get started, create a new HTTP request in Postman. Set the request mode to POST and the URL to https://rickandmortyapi.com/graphql. Now; in the body section, select GraphQL. You should end up with something like this:
-
Making GraphQL Codegen Work For You: GraphQL Integration with React and TypeScript
import "@/styles/globals.css"; import type { AppProps } from "next/app"; import { ApolloClient, InMemoryCache, ApolloProvider } from "@apollo/client"; const client = new ApolloClient({ uri: "https://rickandmortyapi.com/graphql", cache: new InMemoryCache(), }); export default function App({ Component, pageProps }: AppProps) { return ( ApolloProvider> ); }
-
Learn GraphQL and Apollo Client With a Simple React Project
import React from 'react'; import ReactDOM from 'react-dom/client'; import './index.css'; import App from './App'; import { ApolloClient, ApolloProvider, InMemoryCache } from '@apollo/client' const client = new ApolloClient({ uri: "https://rickandmortyapi.com/graphql", cache: new InMemoryCache(), }) const root = ReactDOM.createRoot(document.getElementById('root')); root.render( );
-
When I export my next.js app as a static build, my dynamic routes fail. Is there a way to alter my code so they work in a static site?
I have a next.js app that uses dynamic routes. Here is the repo on Github https://github.com/ChristianOConnor/graphql-next-api-tester. Run the app by cloning the repo and cd-ing into the root directory, running npm install then npm run dev. It works perfectly. It's a next.js app that does graphql calls to https://rickandmortyapi.com/graphql, and renders them out into a table. You first click on the "List of characters" button in the middle of the home page: [![enter image description here][1]][1]
rick-and-morty-api
-
Implementing Infinite scroll in React apps
import { useEffect, useState } from "react"; import axios from "axios"; import "./App.css"; import InfiniteScroll from "react-infinite-scroll-component"; import CharacterCard from "./components/Card"; function App() { const [characters, setCharacters] = useState([]); const [page, setPage] = useState(1); const [hasMore, setHasMore] = useState(true); const [totalPages, setTotalPages] = useState(1); const fetchData = async () => { if (page == totalPages + 1) { setHasMore(false); return; } // <-----------------------------------------------> // waiting for 1 second before fetching data to show loading spinner, you can skip this await new Promise((resolve) => setTimeout(resolve, 1000)); // <-----------------------------------------------> const res = await axios.get( `https://rickandmortyapi.com/api/character?page=${page}` ); setCharacters((prevPosts) => [...prevPosts, ...res.data.results]); setTotalPages(res.data.info.pages); setPage((prevPage) => prevPage + 1); }; useEffect(() => { fetchData(); }, []); return (
Rick and Morty characters!h1> Loading...h4>} endMessage={
Yay! You have seen it allb> p> } > {/* Map over characters array and return JSX */} {characters.map((character, index) => ( ))} InfiniteScroll> div> ); } export default App;
-
Building a Modern Full-Stack MonoRepo Application: A Journey with GraphQL, NextJS, Bun, and AWS
This project was conceived as a coding challenge and a demonstration of integrating modern web technologies into a cohesive application. The core of this project involves leveraging GraphQL to interact with the open-source Rick and Morty API, a task I often set for potential hires.
-
How to Write a GraphQL Query
export const apolloClient = new ApolloClient({ uri: "https://rickandmortyapi.com/graphql", cache: new InMemoryCache({ typePolicies: { Query: { fields: { characters: { keyArgs: false, merge(existing: Characters, incoming: Characters) { return { ...incoming, results: [ ...(existing?.results || []), ...(incoming?.results || []), ], } satisfies Characters; }, }, }, }, }, }), });
-
CS50x Final Project
Hello, my fellow CS students! Are there any Rick & Morty fans here? Because I've just created an app called Portalpal for my final project. It's a fun little app designed to explore the Rick & Morty universe. With Portalpal, you can view, search, paginate, and filter characters. Additionally, you have the option to filter characters by episodes and locations. For the data, I utilized the rickandmorty API, which you can check out here: https://rickandmortyapi.com/. If you'd like to give it a try, here's the link to my app: https://portalpal.vercel.app/. I built it using React 18, and it took me about a month. I'm really proud of how it turned out! If you're interested, you can also find the source code for the app on my GitHub repository: https://github.com/kyawzinhtett/portalpal. Feel free to open an issue if you discover any errors.
- Where to get Free APIs to practice my web dev skills?
-
It's not much but it's mine. Rick and Morty info app. Feedback/code review welcome!
Just a small app consuming the Rick and Morty API showing some basic stats of each character such as last known location, species and what episode(s) they appear in.
-
How to upskill my API Testing.
Checkout https://rickandmortyapi.com and their https://rickandmortyapi.com/graphql
-
Does anybody know the API documentation tool used to build the Rick and Morty API?
Click the guys name in the footer. It’ll take you to his GitHub profile. There you can find the source code to the site and the API.
What are some alternatives?
ReactNativeGQL
graphql-sequelize-generator - A Graphql API generator based on Sequelize.
goctopus - Blazing fast GraphQL discovery & fingerprinting toolbox.
TypeScript - TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
react-native - A framework for building native applications using React
potter-db - A Harry Potter database for all your wizarding needs: Books, Characters, Movies, Spells, and Potions. Powered by https://github.com/danielschuster-muc/scrabby
subfinder - Fast passive subdomain enumeration tool.
graphql-query-example
bifrost - The PsychonautWiki API.
swapi-graphql - A GraphQL schema and server wrapping SWAPI.
React - The library for web and native user interfaces.