-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
switch meetup class to graphql #108
switch meetup class to graphql #108
Conversation
✔️ Deploy Preview for manchester-tech-events ready! 🔨 Explore the source changes: 047c71c 🔍 Inspect the deploy log: https://app.netlify.com/sites/manchester-tech-events/deploys/616d7cdebaba2800083f4c74 😎 Browse the preview: https://deploy-preview-108--manchester-tech-events.netlify.app/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, I should have clarified that due to data aggregation purposes some properties defined within the event
and group
class either do not exist within certain API's (Meetup in this case) such as source
, or are named something different such as desc
, which look to be the only cause for the minor issues within this PR.
there appears to be some issues to do with pulling in the required graphql dependencies (graphql-request was chosen because the graphql website says it's analogous to/uses fetch) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on #103 (comment) the GraphQL API calls need to be modified, I can provide an access token if required, but it does seem that the parameters / nodes / edges are not named the same as what they are mapping towards within the code, and the Meetup GraphQL Schema needs to be referred to again.
Group API Call Example
Curl Call
curl --location --request POST 'https://api.meetup.com/gql' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"query($urlname: String!) {\n groupByUrlname(urlname: $urlname) {\n id\n name\n description\n link\n img\n members\n }\n}","variables":{"urlname":"Tech-for-Good-Live"}}'
Response
{
"errors": [
{
"message": "Cannot query field \"img\" on type \"Group\". Did you mean \"id\"?",
"locations": [
{
"line": 7,
"column": 9
}
],
"extensions": {
"code": "GRAPHQL_VALIDATION_FAILED"
}
},
{
"message": "Cannot query field \"members\" on type \"Group\". Did you mean \"isMember\"?",
"locations": [
{
"line": 8,
"column": 9
}
],
"extensions": {
"code": "GRAPHQL_VALIDATION_FAILED"
}
}
]
}
Events API Call Example
Curl Call
curl --location --request POST 'https://api.meetup.com/gql' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"query($urlname: String!) {\n groupByUrlname(urlname: $urlname) {\n unifiedEvents {\n edges {\n node {\n title\n shortUrl\n venue\n description\n dateTime\n endTime\n going\n maxTickets\n fees\n price\n groupName\n groupLink\n }\n }\n }\n name\n link \n }\n}","variables":{"urlname":"Tech-for-Good-Live"}}'
Response
{
"errors": [
{
"message": "Field \"venue\" of type \"Venue\" must have a selection of subfields. Did you mean \"venue { ... }\"?",
"locations": [
{
"line": 8,
"column": 33
}
],
"extensions": {
"code": "GRAPHQL_VALIDATION_FAILED"
}
},
{
"message": "Field \"fees\" of type \"Fees\" must have a selection of subfields. Did you mean \"fees { ... }\"?",
"locations": [
{
"line": 14,
"column": 33
}
],
"extensions": {
"code": "GRAPHQL_VALIDATION_FAILED"
}
},
{
"message": "Cannot query field \"groupName\" on type \"Event\". Did you mean \"group\"?",
"locations": [
{
"line": 16,
"column": 33
}
],
"extensions": {
"code": "GRAPHQL_VALIDATION_FAILED"
}
},
{
"message": "Cannot query field \"groupLink\" on type \"Event\". Did you mean \"group\"?",
"locations": [
{
"line": 17,
"column": 33
}
],
"extensions": {
"code": "GRAPHQL_VALIDATION_FAILED"
}
}
]
}
this may be a workaround for older npm versions, this was not required with npm 7.24.1
I... think this is how to do it?
-Tasque manager, 2021
oh ye also simplify some pieces of code
Ran locally and it's showing the same error logs as the Netlify Build run, I'll dig into it and review / comment where appropriate. sean@pop-os:~/GitKraken/compiled-mcr-events$ npm run start
> [email protected] start /home/sean/GitKraken/compiled-mcr-events
> node script
Fetching group details for: Web-Tech-Retrospective
Fetching group details for: SODA-Social
(node:10222) UnhandledPromiseRejectionWarning: ReferenceError: is_online_event is not defined
at new event (/home/sean/GitKraken/compiled-mcr-events/_data/sources/templates/event.js:17:32)
at event (/home/sean/GitKraken/compiled-mcr-events/_data/sources/googleCalendar.js:12:33)
at Array.map (<anonymous>)
at /home/sean/GitKraken/compiled-mcr-events/_data/sources/googleCalendar.js:22:85
at processTicksAndRejections (internal/process/task_queues.js:95:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:10222) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:10222) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Fetching group details for: Manchester-Female-Founders
Fetching group details for: Manchester-Digital-Hub-Meetup-Group
Fetching group details for: NDFManchester
Fetching group details for: rebel-meetups-entrepreneur-networking-manchester
Fetching group details for: meetup-group-TRQXKDok
Fetching group details for: Ansible-Manchester
Fetching group details for: Manchester-Infrastructure-Group
Fetching group details for: GM-Cyber-Foundry-Programme-University-of-Salford
Fetching group details for: Manchester-Azure-Dot-NET-Meetup
Fetching group details for: Nevermind-the-Buzzwords
Fetching group details for: Business-Development-Network-Manchester
Fetching group details for: Elementor-Manchester
Fetching group details for: Hyde-Open-Source-Meetup-Group
Fetching group details for: Manchester-Digital-the-tech-and-digital-trade-body
Fetching group details for: Cloud-Native-Kubernetes-Manchester
Fetching group details for: Slalom-Manchester-Meetup-Group
Fetching group details for: DDD-Manchester
Fetching group details for: Eagle-Labs-Incubator-Manchester
Fetching group details for: Manchester-Women-in-Technology-Meetup
Fetching group details for: Manchester-Tech-Cyber-Meetup-Group
Fetching group details for: meetup-group-TlcEbKay
Fetching group details for: Data-Science-Festival-Manchester
Fetching group details for: CTOs-in-Manchester
Fetching group details for: CyberCrowdMCR
Fetching group details for: Analytics-BI-Data-Strategy-Events
Fetching group details for: AND-Chat-Manchester
Fetching group details for: Azure-Workshops-Manchester
Fetching group details for: North-West-Project-Data-Analytics-Meetup
Fetching group details for: Micpod
Fetching group details for: Together-in-Tech-Manchester
Fetching group details for: Manchester-Quantum-Computing
Fetching group details for: Manchester-GCS-Connect-Digital-Data
Fetching group details for: Ministry-of-Coding
Fetching group details for: DevOps-Exchange-Manchester
Fetching group details for: SEO-Affiliation-and-Beers-Casual-Weekly-Meetup
Fetching group details for: Data-Science-ODSC-Manchester
Fetching group details for: Cyber-Data-Protection
Fetching group details for: AR-Manchester
Fetching group details for: Design-Sprint-Manchester
Fetching group details for: Infosec_Hoppers
Fetching group details for: OWASP-Manchester-UK
Fetching group details for: Deliver-Sessions
Fetching group details for: Software-Crafters-North
Fetching group details for: DevSecOps-Manchester
Fetching group details for: android_mcr
Fetching group details for: BCS-Greater-Manchester-Branch
Fetching group details for: blabtalks
Fetching group details for: meetup-group-wHuRVtrk
Fetching group details for: CIA-Chicks-in-Advertising-Manchester
Fetching group details for: CodeYourFuture-Manchester
Fetching group details for: CodeUpManchester
Fetching group details for: CodeUp-Salford
Fetching group details for: Digital-Analytics-Manchester
Fetching group details for: Digital_North_
Fetching group details for: DotNetNorth
Fetching group details for: Enterprise-UX
Fetching group details for: freelance-folk-manchester
Fetching group details for: HackerNestMAN
Fetching group details for: hackspace-manchester
Fetching group details for: HadoopManchester
Fetching group details for: HCD-Manchester
Fetching group details for: IoTMCR
Fetching group details for: JavaScript-North-West
Fetching group details for: Ladies-of-Code-Manchester
Fetching group details for: Agile-Manchester
Fetching group details for: Lean-Agile-Manchester
Fetching group details for: MaccTech
Fetching group details for: Magento-Minds-of-Manchester
Fetching group details for: MancDB
Fetching group details for: Manchester-Bitcoin-blockchain-and-other-cryptocurrencies
Fetching group details for: Manchester-Angular-Workshop
Fetching group details for: free-business-startup-clinics-manchester
Fetching group details for: Manchester-Futurists
Fetching group details for: Manchester-Grey-Hats
Fetching group details for: Manchester-InfoSec
Fetching group details for: ManchesterUK-Java-Community
Fetching group details for: PBIMCR
Fetching group details for: Manchester-R
Fetching group details for: Manchester-React-User-Group
Fetching group details for: ManchesterWordPressUserGroup
Fetching group details for: MancJS
Fetching group details for: McrFRED
Fetching group details for: McrUXD
Fetching group details for: Messaging-Bots-Manchester
Fetching group details for: Neo4j-Manchester
Fetching group details for: North-West-IT-Crowd-Beer-BBQ-Event
Fetching group details for: North-West-Ruby-User-Group
Fetching group details for: Open-Data-Manchester
Fetching group details for: RealUX
Fetching group details for: Salford-Lean-Startup
Fetching group details for: scala-developers
Fetching group details for: SEO-Manchester
Fetching group details for: Social-Software-Development-Meetup-in-Manchester
Fetching group details for: Tech-for-Good-Live
Fetching group details for: Tech-Leads-NW
Fetching group details for: Test-Hive-Manchester
Fetching group details for: Thoughtworks-Manchester-Events
Fetching group details for: UK-North-Crypto-Currency-Meetup
Fetching group details for: The-UX-Crunch-Manchester
Fetching group details for: VRManchester
Fetching group details for: AWS-User-Group-North
Fetching group details for: Code-Nation
Fetching group details for: Manchester-Open-Source
Fetching group details for: DevOps-Manchester
Fetching group details for: StartupBlink-Manchester
Fetching group details for: nwdrupal
Fetching group details for: Manchester-Xamarin-User-Group
Fetching group details for: manchester-node-workshop
Fetching group details for: DATA-VISUALISATION-MEETUP
Fetching group details for: BlockchainManchesterMeetup
Fetching group details for: Manchester-WordPress-SEO-Startup
Fetching group details for: Manchester-Unity3D-Game-Dev-Meetup
Fetching group details for: Google-Cloud-Platform-Users-North-West
Fetching group details for: Manc-Bitcoin
Fetching group details for: craftcmsmanchester
Fetching group details for: Couchbase-Manchester
Fetching group details for: NSManchester
Fetching group details for: Python-North-West-Meetup
Fetching group details for: ExpertTalks-Manchester
Fetching group details for: herplusdatamcr
Fetching group details for: northernsoho
Fetching group details for: North-West-Playtesters
Fetching group details for: VueJS-Manchester
Fetching group details for: etechmcr
Fetching group details for: Introduction-to-Bitcoin-and-Cryptoeconomics
Fetching group details for: Bitcoin-Manchester
Fetching group details for: Manchester-F-User-Group
Fetching group details for: Manchester-Technology-Leaders-Meet-Up-Group
Fetching group details for: North-West-Bitcoin-Meetup
Fetching group details for: WMUGMCR
Fetching group details for: Kotlin-Manchester
Fetching group details for: Docker-Manchester
Fetching group details for: Manchester-OpenInfra-Meetup
Fetching group details for: Women-in-Technology-North
Fetching group details for: ibmaimanchester
Fetching group details for: MCR-CoderDojo
Fetching group details for: meetup-group-MsiOIcyg
Fetching group details for: Manchester-Blockchain-Organisation
Fetching group details for: EOS-Manchester
Fetching group details for: HacksHackersMCR
Fetching group details for: rladies-manchester
Fetching group details for: golang-mcr
Fetching group details for: Ministry-of-Testing-Manchester
Fetching group details for: Manchester-Redis
Fetching group details for: gdg_manchester
Fetching group details for: Manchester-Artificial-Intelligence-Meetup
Fetching group details for: GraphQL-Manchester
Fetching group details for: PyData-Manchester
Fetching group details for: Codebar-Manchester
Fetching group details for: The-Future-of-DevOps-and-Security
Fetching group details for: Manchester-Kafka
Fetching group details for: Manchester-Bitcoin-Miners-Meetup
Fetching group details for: EndHomelessness-digital-community
Fetching group details for: uxey-manchester
Fetching group details for: ManchesterData
Fetching group details for: Manchester-Elastic-Fantastics
Fetching group details for: Manchester-Cassandra-Users
Fetching group details for: Manchester-MongoDB-User-Group
Fetching group details for: The-Manchester-PostgreSQL-Meetup
Fetching group details for: Manchester-Web-Performance-Group
Fetching group details for: You-Equal-Tech-North
Fetching group details for: Manchester-Conversion-Optimisation-Meetup
Fetching group details for: The-DevOps-Battle-Royale
Fetching group details for: leanmanc
Fetching group details for: Techs-and-The-City
Fetching group details for: Manchester-Mobile-Development-Meetup
Fetching group details for: CRUMUG-UK-North-West
Fetching group details for: Manchester-MySQL-Meetup
Fetching group details for: Manchester-Tyks
Fetching group details for: Analytics-at-Speed-Manchester
Fetching group details for: elm-manchester
Fetching group details for: Manchester-Kubernetes-Meetup
Fetching group details for: CodeUp-Stockport
Fetching group details for: The-Federation
Fetching group details for: McrDataPlatform
Fetching group details for: Manchester-AI-Tech-Data-Business-Intelligence
Fetching group details for: Blockchain-Revolution-Tour
Fetching group details for: meetup-group-tHZJZdOn
Fetching group details for: Solidarity-in-Tech
Fetching group details for: Northern-Azure-User-Group
Fetching group details for: GlugManchester
Fetching group details for: Manchester-Web-Meetup
Fetching group details for: Neurons-AI-UK-Manchester
Fetching group details for: Chatbots-Manchester
Fetching group details for: meetup-group-XeWAIbQi
Fetching group details for: UXSessions
Fetching group details for: Laravel-Mcr
Fetching group details for: Graduate-Hackathons
Fetching group details for: Write-the-Docs-North
Fetching group details for: The-Power-of-User-Research-Manchester
Fetching group details for: UX-Community-Manchester
Fetching group details for: ProductTank-Manchester
Fetching group details for: meetup-group-FBUGjRaS
Fetching group details for: Microservices-North
Fetching group details for: Health-2-0-Manchester
Fetching group details for: manchester-geek-nights
Fetching group details for: Manchester-Patterns-Group
Fetching group details for: Manchester-Software-Craftsmanship-Community
Fetching group details for: thesocialcode
Fetching group details for: Manchester-Umbraco-Meetup
Fetching group details for: Manchester-Small-Business-Support-group
Fetching group details for: The-Marketing-Meetup-Manchester
Fetching group details for: Lean-Agile-Stockport
Fetching group details for: Digital-Transformers-Manchester
Fetching group details for: Find-a-business-partner
Fetching group details for: northwest-personal-development
Fetching group details for: North-West-Business-Meetup
Fetching group details for: Infinity-Works-101-Sessions
Fetching group details for: Manchester-Software-Architecture-Meetup
Fetching group details for: BI-DataWebinarswithChrisIngman
Fetching group details for: Online-Marketing-Minds-of-Manchester
Fetching group details for: MancBizBooks
Fetching group details for: Digital-Transformation-Manchester
Fetching group details for: Business-growth-and-scaling
Fetching group details for: CRAP-Talks-CRO-Analytics-Product-Manchester
Fetching group details for: UK-Windows-Virtual-Desktop-User-Group
Fetching group details for: Manchester-Entrepreneurs-Social-Entrepreneurs
Fetching group details for: Startup2sme
Fetching group details for: UK-Startup-Idea-to-IPO
Fetching group details for: manchestertechtalks
Fetching group details for: LetsGetDisruptive
Fetching group details for: Manchester-Brand-Building-Meetup
Fetching group details for: Manchester-Numberwang-A-Data-Lovers-Meetup
Fetching group details for: manchestermagento
Fetching group details for: ONEMINUTEBRIEFSMCR
Fetching group details for: build-business-networking-manchester
Fetching group details for: QAstiontime
Fetching group details for: Manchester-Womens-Social-Meetup-Fizz-Fun-Fab-Females
Fetching group details for: Eco-Home-Lab-Manchester
Fetching group details for: Maxwell-Bond-Trusted-Tech-Talks
Fetching group details for: Entrepreneur-Drinks-sponsored-by-Buckworths
Fetching group details for: mancunian-melanoids
Fetching group details for: NUX-UK
Fetching group details for: Manchester-Unreal-Engine-Meetup
Fetching group details for: Data-Science-Manchester
Fetching group details for: start-an-online-business-doing-what-you-love
Fetching group details for: launch-your-business
Fetching group details for: Tech-Women-Manchester
Fetching group details for: QA-Beginners-Club
Fetching group details for: Serverless-Manchester
Fetching group details for: amazinsellers-eCommerce-Entrepreneurs-Manchester
Fetching group details for: Manchester-Artificial-Intelligence-Deep-Learning
Fetching group details for: B2B-Manchester
Fetching group details for: typedb-manchester
Fetching group details for: Internet-Marketing-Mastermind-Manchester
Fetching group details for: Oldham-WordPress-Meetup
Fetching group details for: manchester-digital-marketing-meetup-group
Fetching group details for: Data-Science-Foundation-Manchester
Fetching group details for: Manchester-Business-Acquisitions-Meetup
Fetching group details for: Get-with-the-Project
Fetching group details for: Manchester-AI
Fetching group details for: AND-Digital-Events-Manchester
Fetching group details for: Manchester-IT-Strategy-Meetup
Fetching group details for: devsconnect
Fetching group details for: Manchester-Entrepreneur-Circle
Fetching group details for: Linked-Data-Manchester
Fetching group details for: Manchester-Digital-Marketing-Meetup
Fetching group details for: TechNorth-Mcr
Fetching group details for: MPNorth
Fetching group details for: Manchester-Podcasters-Meetup
Fetching group details for: data-engineering-user-group-with-robert-walters
Fetching group details for: rust-manchester
Fetching group details for: Blended-Agile-Delivery-Manchester
Fetching group details for: Funders-and-Founders-Manchester
Fetching group details for: fjr-technology-manchester
Fetching group details for: productdesignmanchester
Fetching group details for: TechReturners
Fetching group details for: Manchester-Microsoft-Azure-For-Developers
Fetching group details for: Manchester-North-West-Startup-Marketing-Professionals
Fetching group details for: dept-talks-manchester
Fetching group details for: Manchester-Game-Development-Meetup-Group
Fetching group details for: UX-Design-Solutions-Manchester
Fetching group details for: Business-IP-Centre-Manchester
Fetching group details for: PowerShell-Manchester-UK
Fetching group details for: Manchester-ecommerce-club
Fetching group details for: Manchester-HashiCorp-User-Group
Fetching group details for: digital-and-social-media-marketing
Fetching group details for: Manchester-Architecture-Think-Tank
Fetching group details for: manchester-data-science-meetup-group
Fetching group details for: Manchester-Cyber-Security-for-Control-Systems
Fetching group details for: Manchester-WooCommerce-Meetup
Fetching group details for: Manchester-Product-Coffee
Fetching group details for: event-driven-architectures-in-manchester
Fetching group details for: Unify-Academy-Software-Testing-Courses
Fetching group details for: Manchester-Coworking-Meetup-Group
Fetching group details for: The-Inclusion-Coalition
Fetching group details for: manchester-business-startup-group
Fetching group details for: sme-online-forum
Fetching group details for: manchester-female-entrepreneurs
Fetching group details for: Gravitas-Manchester-Meet-Up
Fetching group details for: Inventors-Meetup-Group
Fetching group details for: cloud-security-manchester
Fetching group details for: Distributed-Data-Manchester
Fetching group details for: Oracle-Meetup-Group-North-West
Fetching group details for: ecommercegroupuk
Fetching group details for: neurodivergent-entrepreneurs-adhd-asd-dyslexia
Fetching group details for: manchester-biotech-bioinformatics
Fetching group details for: Rochdale-WordPress-Meetup
Fetching group details for: infused-in-the-community
Fetching group details for: Talentful-Talks-Tech
Fetching group details for: the-cloud-user-group
Fetching group details for: MusicTech-North
Fetching group details for: The-Manchester-Responsible-Business-Collective-MRBC
Fetching group details for: Women-in-Business-UK
Fetching group details for: C-I-N-G
Fetching group details for: data-leaders-north-people-centric-innovation
Fetching group details for: manchesteryoungentrepreneurnetworkers
Fetching group details for: North-West-Tech-Talks
Fetching group details for: SaltStack-Manchester-Meetup
(node:10222) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'groupByUrlname' of undefined
at group (/home/sean/GitKraken/compiled-mcr-events/_data/sources/meetup.js:59:24)
at Array.map (<anonymous>)
at /home/sean/GitKraken/compiled-mcr-events/_data/sources/meetup.js:131:75
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
(node:10222) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
sean@pop-os:~/GitKraken/compiled-mcr-events$ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like these are the only things left to fix on this specific PR, then #116 can be looked at.
This pull request introduces 1 alert when merging e4eb32a into d934949 - view on LGTM.com new alerts:
|
e4eb32a
to
6345e64
Compare
idrk what's happening, see inevitable-team#108 (comment)
local tests were successful |
idrk what's happening, see inevitable-team#108 (comment)
this is to help prevent future issues due to an api nearing deprecation