TMC is an independent, primarily volunteer organization that relies on ad revenue to cover its operating costs. Please consider whitelisting TMC on your ad blocker and becoming a Supporting Member. For more info: Support TMC
Start a Discussionhttps://teslamotorsclub.com/tmc/tags/

Superchargers.io is an open source GraphQL API for finding Tesla Superchargers, destination chargers

Discussion in 'Model S: User Interface' started by dewski, Nov 4, 2016.

  1. dewski

    dewski Member

    Joined:
    Feb 7, 2016
    Messages:
    6
    Location:
    Sacramento, CA
    Superchargers.io

    I'm a pretty huge Tesla fan and programmer, so I figured why not combine the two and create a resource for other Tesla fans and programmers alike. It's open source so you can learn from the code, contribute, or just create issues for things you'd like to see.

    With Superchargers.io you can find:
    • Locations that are opening soon
    • Locations within a specific region or country
    • Specific types of locations like superchargers, destination chargers, standard chargers, and service centers
    • Locations that are within a specific geographical area using a bounding box
    The company I work for has been heavily investing in GraphQL for our API and this was a opportunity to familiarize myself with it a bit more. If you're new to GraphQL or not sure what it is, I'd recommend playing around in the GraphiQL editor which provides a nice interface to help you discover fields and build queries.

    Originally developed by Facebook, GraphQL is described as:

    GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. GraphQL provides a complete and understandable description of the data in your API, gives clients the power to ask for exactly what they need and nothing more, makes it easier to evolve APIs over time, and enables powerful developer tools.​

    Let me know what you think and if there is anything you'd like to see.

    If you have any questions I'd be happy to answer them.
     
  2. Elric2176

    Elric2176 Member

    Joined:
    Mar 21, 2015
    Messages:
    12
    Location:
    Boston, MA area
    I tried this out and it just shows a blank white page with supercharger "pins" stuck in it. No map outline or anything else. Is this expected behavior?
     
  3. dewski

    dewski Member

    Joined:
    Feb 7, 2016
    Messages:
    6
    Location:
    Sacramento, CA
    Do you have a screenshot or query that I can use to reproduce it?
     
  4. Veggen

    Veggen Member

    Joined:
    Dec 22, 2011
    Messages:
    70
  5. dewski

    dewski Member

    Joined:
    Feb 7, 2016
    Messages:
    6
    Location:
    Sacramento, CA
    Thank you for sharing Veggen, which browser are you using? Looks like it may not support WebGL which Mapbox uses for the map. Could you check WebGL Report and report the Browser User Agent value if it does not pass?
     
  6. Veggen

    Veggen Member

    Joined:
    Dec 22, 2011
    Messages:
    70
    Map missing in Vivaldi and Firefox, although WebGL Report seems good:
    upload_2016-11-5_15-41-44.png
    Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.148 Safari/537.36 Vivaldi/1.4.589.38
    Mozilla/5.0 (Windows NT 10.0; WOW64; rv:48.0) Gecko/20100101 Firefox/48.0

    Map working OK in Edge:
    Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14.14393
     
  7. cgiGuy

    cgiGuy Active Member

    Joined:
    Jul 9, 2013
    Messages:
    1,299
    Location:
    Sacramento, CA
    Works for me on Chrome and Safari, Mac running 10.10.5.
     
  8. surendra

    surendra New Member

    Joined:
    Feb 18, 2017
    Messages:
    1
    Location:
    india
    I want to use this data in my ios App. for that i need shema.json file . I am using this method
    "apollo-codegen download-schema GraphiQL · Superchargers.io --output schema.json"
    from this this website Downloading a schema | Apollo iOS Guide but i am getting this error "

    Error while fetching introspection query result: request to https://www.superchargers.io/graphql failed, reason: unable to verify the first certificate
    "

    so how can i get shema.json?. I am new in graphql. i am just following this tutorialLearn Apollo. thx
     
  9. Chrisizzle

    Chrisizzle Member

    Joined:
    Nov 25, 2014
    Messages:
    273
    Location:
    Toronto, Ontario, canada
    I'm not a programmer so most of the above is lost on me.

    So, I'll ask if you were aware of the existing www.SuperCharge.info website?
    And as a potential user, how does your site differ or improve upon it?
     

Share This Page