Comments (5)
Thanks @ecshreve!
from 5e-srd-api.
@theone85ca
on Discord is spearheading this one.
from 5e-srd-api.
I've actually taken this own because we're on MongoDB Atlas now that supports this.
from 5e-srd-api.
I've run into a blocker on this. Everything works except the spells table:
5e-database.5e-database.spells <root> InvalidType unable to create type "SpellDamageDamage_at_character_level" because of no valid fields
5e-database.5e-database.spells <root> InvalidType unable to create type "SpellDamageDamage_at_slot_level" because of no valid fields
5e-database.5e-database.spells <root> InvalidType unable to create type "SpellHeal_at_slot_level" because of no valid fields
Here is the generated schema:
{
"title": "spell",
"properties": {
"_id": {
"bsonType": "objectId"
},
"area_of_effect": {
"bsonType": "object",
"properties": {
"size": {
"bsonType": "int"
},
"type": {
"bsonType": "string"
}
}
},
"attack_type": {
"bsonType": "string"
},
"casting_time": {
"bsonType": "string"
},
"classes": {
"bsonType": "array",
"items": {
"bsonType": "object",
"properties": {
"index": {
"bsonType": "string"
},
"name": {
"bsonType": "string"
},
"url": {
"bsonType": "string"
}
}
}
},
"components": {
"bsonType": "array",
"items": {
"bsonType": "string"
}
},
"concentration": {
"bsonType": "bool"
},
"damage": {
"bsonType": "object",
"properties": {
"damage_at_character_level": {
"bsonType": "object",
"properties": {
"1": {
"bsonType": "string"
},
"5": {
"bsonType": "string"
},
"11": {
"bsonType": "string"
},
"17": {
"bsonType": "string"
}
}
},
"damage_at_slot_level": {
"bsonType": "object",
"properties": {
"1": {
"bsonType": "string"
},
"2": {
"bsonType": "string"
},
"3": {
"bsonType": "string"
},
"4": {
"bsonType": "string"
},
"5": {
"bsonType": "string"
},
"6": {
"bsonType": "string"
},
"7": {
"bsonType": "string"
},
"8": {
"bsonType": "string"
},
"9": {
"bsonType": "string"
}
}
},
"damage_type": {
"bsonType": "object",
"properties": {
"index": {
"bsonType": "string"
},
"name": {
"bsonType": "string"
},
"url": {
"bsonType": "string"
}
}
}
}
},
"dc": {
"bsonType": "object",
"properties": {
"dc_success": {
"bsonType": "string"
},
"dc_type": {
"bsonType": "object",
"properties": {
"index": {
"bsonType": "string"
},
"name": {
"bsonType": "string"
},
"url": {
"bsonType": "string"
}
}
},
"desc": {
"bsonType": "string"
}
}
},
"desc": {
"bsonType": "array",
"items": {
"bsonType": "string"
}
},
"duration": {
"bsonType": "string"
},
"heal_at_slot_level": {
"bsonType": "object",
"properties": {
"1": {
"bsonType": "string"
},
"2": {
"bsonType": "string"
},
"3": {
"bsonType": "string"
},
"4": {
"bsonType": "string"
},
"5": {
"bsonType": "string"
},
"6": {
"bsonType": "string"
},
"7": {
"bsonType": "string"
},
"8": {
"bsonType": "string"
},
"9": {
"bsonType": "string"
}
}
},
"higher_level": {
"bsonType": "array",
"items": {
"bsonType": "string"
}
},
"index": {
"bsonType": "string"
},
"level": {
"bsonType": "int"
},
"material": {
"bsonType": "string"
},
"name": {
"bsonType": "string"
},
"range": {
"bsonType": "string"
},
"ritual": {
"bsonType": "bool"
},
"school": {
"bsonType": "object",
"properties": {
"index": {
"bsonType": "string"
},
"name": {
"bsonType": "string"
},
"url": {
"bsonType": "string"
}
}
},
"subclasses": {
"bsonType": "array",
"items": {
"bsonType": "object",
"properties": {
"index": {
"bsonType": "string"
},
"name": {
"bsonType": "string"
},
"url": {
"bsonType": "string"
}
}
}
},
"url": {
"bsonType": "string"
}
}
}
from 5e-srd-api.
Just dropping this here so it doesn't get lost in discord (and because I'm forgetful)
Poked around with generating the graphql schema a bit tonight and i think i figured out the problem, in the graphql spec field names have to start with at least one uppercase or lowercase letter, and the field names in
Damage_at_character_level Damage_at_slot_level Heal_at_slot_level
are just integers. I did a find/replace for all of those and pre-pended them with an "a" just to check and was able to generate the graphql schema with no errors (just some warnings). http://spec.graphql.org/June2018/#sec-Names
from 5e-srd-api.
Related Issues (20)
- A little confusion with the return value for Monster/Action HOT 2
- Inconsistency in url
- Mountain dwarf is missing HOT 1
- API down HOT 1
- Harvesting Information for Monsters HOT 1
- Adjust `/api/` to server up the new DB table that has all that info HOT 1
- [documentation] - enumerate `api/spells/{index}` -> `damage` field
- /api/levels endpoint returned by /api is not found HOT 2
- Filter Monsters by XP and XP Range HOT 1
- Fail to build open-api spec, because of a $ref circle HOT 2
- GraphQl Search Functionality HOT 1
- Magic Item with rarity Common breaks the GraphQL query HOT 4
- Invalid refs in OpenAPI spec HOT 4
- path in quotes in bundled yaml when path contain curly braces HOT 1
- GraphQL: Cannot query field "alignments" on type "Monster" HOT 5
- Add number of spells cast field HOT 1
- [Feature Request] Add Search API HOT 3
- TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /app/tools/copyAssets.ts HOT 6
- subclass endpoint returning only one result HOT 2
- Magic missile spell: Damage at slot level are incorrects HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from 5e-srd-api.