Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/studded/events-graph-api

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/studded/events-graph-api

  • v0.0.0-20240531191831-268498c95bc4
  • Source
  • Go
  • Socket score

Version published
Created
Source

Future Considerations:

  • Use Dataloader to fix potential N+1 queries
  • Add more pagination as needed
  • Validate date/times (end should be after start, etc.)
  • Last admin role for an event should not be deleted

Example:

query showEvent($id: ID!) {
  event(id: $id) {
    id
    name
    location
    description
    startDate
    endDate
    activities {
      name
      description
      startTime
      endTime
    }
    roles {
      user {
        name
      }
      type
    }
    expenses {
      name
      cost
      category
    }
    expenseTotal
    expenseCategories {
      category
      total
    }
  }
}

Output:

{
  "data": {
    "event": {
      "id": "1",
      "name": "Birthday",
      "location": "Dublin",
      "description": "Happy Birthday!",
      "startDate": "2024-06-26T00:00:00Z",
      "endDate": "2024-06-26T00:00:00Z",
      "activities": [
        {
          "name": "Cake",
          "description": "Let them eat cake!",
          "startTime": "2024-06-26T00:00:00-07:00",
          "endTime": "2024-06-26T00:00:00-07:00"
        },
        {
          "name": "Presents",
          "description": "Open them up!",
          "startTime": "2024-06-26T00:00:00-07:00",
          "endTime": "2024-06-26T00:00:00-07:00"
        }
      ],
      "roles": [
        {
          "user": {
            "name": "Kevin"
          },
          "type": "admin"
        },
        {
          "user": {
            "name": "Brandon"
          },
          "type": "contributor"
        },
        {
          "user": {
            "name": "Alana"
          },
          "type": "attendee"
        }
      ],
      "expenses": [
        {
          "name": "Snacks",
          "cost": 9.99,
          "category": "food"
        },
        {
          "name": "Drinks",
          "cost": 5.99,
          "category": "food"
        },
        {
          "name": "Balloons",
          "cost": 3.5,
          "category": "decorations"
        }
      ],
      "expenseTotal": 19.48,
      "expenseCategories": [
        {
          "category": "decorations",
          "total": 3.5
        },
        {
          "category": "food",
          "total": 15.98
        }
      ]
    }
  }
}

FAQs

Package last updated on 31 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc